Jan 17, 2008 #1 DayLaborer Programmer Joined Jan 3, 2006 Messages 347 Location US What would the few lines of code be to programatically rename a specific file using C#? Thanks, Eliezer
What would the few lines of code be to programatically rename a specific file using C#? Thanks, Eliezer
Jan 17, 2008 #2 robertfah Programmer Joined Mar 20, 2006 Messages 380 Location US File.Move(@"C:\MyFile.txt", @"C:\MyNewerFile.txt"); Upvote 0 Downvote
Jan 17, 2008 Thread starter #3 DayLaborer Programmer Joined Jan 3, 2006 Messages 347 Location US There is File.Copy, File.Move, but not File.Rename How do you rename a file in a similar manner? Eliezer Upvote 0 Downvote
There is File.Copy, File.Move, but not File.Rename How do you rename a file in a similar manner? Eliezer
Jan 17, 2008 #4 bigtimmin MIS Joined Apr 12, 2005 Messages 125 Location US Using File.Move renames the file. Just change the name in the destination. (see robertfah's example) http://satellite-tv-for-pc.eklicks.com/ Upvote 0 Downvote
Using File.Move renames the file. Just change the name in the destination. (see robertfah's example) http://satellite-tv-for-pc.eklicks.com/