
Dim fso, MyFile, LenFile
Dim infile,outfile
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell") 
Set MyFile = fso.CreateTextFile("c:\ctconv.log", True)

'fso.CopyFile "\\arcserve\c$\!Backup\backuptest.cmd", "c:\windowsscripts\backuptestcopytest.cmd"
	if Wscript.arguments.Count = 2 then 
		if lcase(right(Wscript.arguments.Item(0),3))="wav" then
			infile=Wscript.arguments.Item(0)
			outfile=Wscript.arguments.Item(1)
			on error resume next
			WSHShell.Run "%commander_path%\Plugins\WCX\CTConv\programm\wav2midi\Recogn.exe " & infile,0,true
			MyFile.WriteLine("%commander_path%\Plugins\WCX\CTConv\programm\wav2midi\Recogn.exe " & infile)
			LenFile=len(infile)
			fso.MoveFile left(infile,LenFile-4) & ".mid" , outfile
		end if
	else
				
	end if


MyFile.Close
