outfile=WriteFile("h:\temp.bat") WriteLine(outfile,"rename h:\peach.exe peach.jpg") CloseFile outfile ExecFile("h:\temp.bat") ;DeleteFile("h:\temp.bat")
This seems to work fine- upto the point where I enable the last line, so I think there's no way to avoid an ugly .BAT file from staying on the harddisk. :/