|
-
Nov 16th, 2007, 10:04 AM
#1
Thread Starter
Lively Member
change FileName
Is there anyway to programmatically change the name of a file. I can change the extension but not the name.
thanks,
-zd
-
Nov 16th, 2007, 10:08 AM
#2
Hyperactive Member
Re: change FileName
Yes, you use the File.Move method of System.IO.
Just like you do in linux (mv filename.ext newfilename.ext).
C# Code:
using System.IO;
// Namespaces etc.
File.Move("old.ext", "new.ext");
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
-
Nov 16th, 2007, 10:08 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|