Hi
First try in local drive like D,E ,other than OS drive it will work or not ?
or
Try this code
Use the VB assembly in C# Add reference to Microsoft.VisualBasic
then to rename a file
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(myfile, newName);
Both are strings, note that myfile has the full path. newName does not. for example
a="C:\whatever\a.txt";
b="b.txt";
Microsoft.VisualBasic.FileIO.FileSystem.RenameFile(a, b);
C:\whatever\ folder will now contain b.txt
Regards
Aravind