Results 1 to 1 of 1
Thread: Renaming a file (VB .NET 2008)
2008-07-19, 20:06 #1
- Join Date
- Aug 2001
- Jeddah, Saudi Arabia
- Thanked 1 Time in 1 Post
Renaming a file (VB .NET 2008)
In one of my programs I have written to tidy up my rather large music library I wanted to 'Pretty Case' my file names. For example, 'dark side of the moon' to 'Dark Side of the Moon'. So I merrily coded my routine to use My.Computer.FileSystem.RenameFile(OriginalFileName , NewPrettyFileName) and lo-and-behold received an error message telling me that a file with the same name already exists.
While this is not a train smash and I can easily code around it by creating a random file name then doing the old switcheroo of OldName==>RandomName==>NewName I do find it annoying that I have to code around something I can do easily using Explorer.
Anybody else come across stuff like this?