Programatically setting the LastWriteTime of My Documents and Desktop folders

vb.net , directoryinfo.lastwritetime , system folders London, United Kingdom
  • 12 years ago
    I am building a .NET Program using VB.NET. The Program needs to update the Last Write Time of the My Documents Folder. However, whenever I do this using System.IO.Directory.SetLastWriteTimeUtc or System.IO.DirectoryInfo.LastWriteTimeUtc, I receive an error saying that the folder is locked by another process. This is not the case for any other folder; just for My Documents and Desktop. Any ideas how I can programatically change the Last Write Time for these folders using .NET?

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“You can stand on the shoulders of giants OR a big enough pile of dwarfs, works either way.”