Is there anyway to programmatically change the name of a file. I can change the extension but not the name.
thanks,
-zd
Printable View
Is there anyway to programmatically change the name of a file. I can change the extension but not the name.
thanks,
-zd
Yes, you use the File.Move method of System.IO.
Just like you do in linux (mv filename.ext newfilename.ext).
C# Code:
using System.IO; // Namespaces etc. File.Move("old.ext", "new.ext");