For some reason I thought he was just trying to change the filename as a
string...it's early here :) Combining with Arne's code, we get:
string newFilename = openFileDialog1.FileName;
File.Move( openFileDialog1.FileName,
Path.ChangeExtension(openFileDialog1.FileName, ".asf") );
ShaneB
<Arne Schittenhelm> wrote in message
news:jo********************************@4ax.com...
On Fri, 12 Nov 2004 16:10:15 +0800, "li***@0536.net"
<li******@sina.com.cn> wrote:
i have a file "a.mp3"
but i want wo change it to "a.asf"(not in convert,only to change the file
header and extent)
how to?
thanks
To change file extensions this works well
string newFilename = openFileDialog1.FileName;
newFilename = newFilename.Substring(0, filename.LastIndexOf(@".")) +
".asf";
File.Move(openFileDialog1.FileName, newFilename);