With normal files and directories, it's relatively easy to set their created and modified datetime in .NET. Just create a DirectoryInfo
for that path and set CreationTimeUtc
and LastWriteTimeUtc
to what you want. However, when you create a DirectoryInfo
for a junction point and set these properties, it resolves the junction point to its target and sets the target instead. Oddly, when you read the properties, they in fact show the created/modified datetime of the junction point itself.
How can I set the junction point's datetimes?