shadowfla Posted August 22, 2004 Share Posted August 22, 2004 hi everyone, i need some help making a batch file in win xp pro sp1the following code is in the batch file, basically it is starting freeenc.exe which is an encoder , and the text that comes after freeenc.exe is supposed to be the switches that i want to use with freenc, and yes they are the right switches for the program. The problem is when i run this, windows gives me a File Not Found errorthis is my first time writing a batch file, im pretty sure i got the syntax wrong or something like that,...please anyone help?start /wait "C:\Program Files\DIKO\FreeEnc\FreeEnc.exe /i "C:\finals\scripts\11.avs" /o "C:\finals\mpvs\11.mpv" /2 /b 2000 /aspectratio 4:3 /gopsize 18 /maxbitrate 4000 /priority 5 /dc 8 /mpeg2 /scene /extreme /maxbframes 2 /kvcd /auto /close Link to comment Share on other sites More sharing options...
jdoe Posted August 22, 2004 Share Posted August 22, 2004 I don't know why people are always use start /wait when call is doing the same job.Maybe someone could post me the reason why...@shadowfla: For your batch try this command (you forgot a quote at the end of freeenc.exe)start /wait "C:\Program Files\DIKO\FreeEnc\FreeEnc.exe" /i "C:\finals\scripts\11.avs" /o "C:\finals\mpvs\11.mpv" /2 /b 2000 /aspectratio 4:3 /gopsize 18 /maxbitrate 4000 /priority 5 /dc 8 /mpeg2 /scene /extreme /maxbframes 2 /kvcd /auto /closeAnd if it don't work, try this oneCALL "C:\Program Files\DIKO\FreeEnc\FreeEnc.exe" /i "C:\finals\scripts\11.avs" /o "C:\finals\mpvs\11.mpv" /2 /b 2000 /aspectratio 4:3 /gopsize 18 /maxbitrate 4000 /priority 5 /dc 8 /mpeg2 /scene /extreme /maxbframes 2 /kvcd /auto /closeMake sure that11.AVS is in C:\finals\scripts11.mpv is in C:\finals\mpvs----------- Link to comment Share on other sites More sharing options...
jaclaz Posted August 22, 2004 Share Posted August 22, 2004 From the type of error you get it seems like the command interpreter takes one of the parameters as the name of a file, and, not finding it, gives the error.You COULD try something like the following:SET COMMAND1="C:\Program Files\DIKO\FreeEnc\FreeEnc.exe"SET PARAM1=/iSET COMMAND2=C:\finals\scripts\11.avsSET PARAM2=/oSET COMMAND3=C:\finals\mpvs\11.mpvSET PARAM3=/2 /b 2000 /aspectratio 4:3 /gopsize 18 /maxbitrate 4000 /priority 5 /dc 8 /mpeg2 /scene /extreme /maxbframes 2 /kvcd /auto /closestart /wait %COMMAND1% %PARAM1% %COMMAND2% %PARAM2% %COMMAND3% %PARAM3%::Clear up Environment Variables usedSET COMMAND1=SET PARAM1=SET COMMAND2=SET PARAM2=SET COMMAND3=SET PARAM3=and partialize it to understand which part causes the error.Though seemingly more complex, this way it makes it easier to change paths to the files.Please note that you only need quotes in the COMMAND1 string as there is a space between 'Program' and 'Files'jaclaz Link to comment Share on other sites More sharing options...
CoffeeFiend Posted August 22, 2004 Share Posted August 22, 2004 I don't know why people are always use start /wait when call is doing the same job.Maybe someone could post me the reason why...Actually it doesn't do the same job. I haven't looked into it deeper, but I never use start /wait and I never have problems. (just like we don't *have* to use msiexec.exe to launch .msi's I guess?). The only time you really need to use CALL is if you're launching another batchfile. If you omit call, the 2nd batchfile won't return. Link to comment Share on other sites More sharing options...
shadowfla Posted August 22, 2004 Author Share Posted August 22, 2004 thanks everybody for the fast response, jdoe both of your ideas didnt work, i had tried putting that " mark before and it didnt helpjaclaz is right though , its as if command interpreter thinks that one of the parameters is a file name. Ill try your idea jaclaz tommorow ASAPthanks alot all! Link to comment Share on other sites More sharing options...
glent Posted August 22, 2004 Share Posted August 22, 2004 no offence but his problem relates to software created over@ kvcd.net forums you get a better responce for the creator of the app wouldnt you? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now