How to rename a file with string format in C#? -


this situation: created new file name using string format like:

string newfilename = string.format("{0}/{1}/{2}/{3}.txt", fileinfo.year,             fileinfo.month, fileinfo.day, fileinfo.time); 

and have another(old) file path: string path = @"c:\users\public\filename.txt" change or move old --> new. how that? possible change path of new? there can me. in advance

 string path = @"c:\users\public\filename.txt";   if (file.exists(path))             file.move(path, "destinationfilepath"); 

Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -