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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -