| re: how to change filetype?
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:jo19p0h491te931bsqtelau19plf7f67k5@4ax.com...[color=blue]
> On Fri, 12 Nov 2004 16:10:15 +0800, "lizhx@0536.net"
> <lixi0179@sina.com.cn> wrote:
>[color=green]
>>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
>>[/color]
>
> To change file extensions this works well
>
> string newFilename = openFileDialog1.FileName;
> newFilename = newFilename.Substring(0, filename.LastIndexOf(@".")) +
> ".asf";
> File.Move(openFileDialog1.FileName, newFilename);[/color] |