5
Answers

check the filename existence in the list list[] before move (rename)

Suresh Panta

Suresh Panta

4y
547
1
how can I check if the fileName has existed on the list or not before the move? 
 
NewFileName = Path.GetDirectoryName(OldFileName) + "\\" + NewFileName; 
 
System.IO.File.Move(OldFileName, NewFileName); 
thnk you in advance! 
 
Answers (5)