Page 1 of 1

Values dependant of input file name

Posted: 28 Aug 2009 13:42
by darkelf5
Hi. This is a total noob question, but plz help me.
I have a batch file that does some video processing when you drag a file onto it.
How can i get it to set differente value for certain files i drag? For example
If input file is 1.avi then SOMEVALUE=500. I've tried if %1=1.avi then... But it gives me an error.
Oh yeah, and another thing. Earlier i could just tupe shutdown.exe in my scripts and my computer would shutdown. Now i have to type the whole path win\system32\shutdown.exe because my batch script start in the folder they are residing.

Posted: 28 Aug 2009 15:34
by avery_larry
Try:

if "%~nx1"=="1.avi"

shutdown is dependent on your path variable. Is win/system32 in your path? Sounds like your path is messed up.

Posted: 29 Aug 2009 04:59
by darkelf5
Thank you.