tags:

views:

90

answers:

2

hi guys,

i tried looking at the other questions regarding this, but no go. i've tried a straight call to the other bat file ("otherBat.bat," for instance), a "call" command, and even a "start" command. all of these are failing though, and i'm at a loss as to why. both .bat files are within the same folder, and i'm not changing directories, so i don't know what the problem is...

any help on this would be much appreciated ^_^

edit: sorry, here's the code :)

primary.bat:

echo Test run...enter variable1
set /p var1=:


echo Test run...enter variable2
set /p var2=:


call other.bat %var1% %var2%

pause

other.bat:

echo Working!
pause
+1  A: 

Is the second .bat file in your path? What happens if you change your first .bat file to call it using an absolute path?

DVK
i tried an absolute path, no go on that either :/
splatback
+1  A: 

You should either cd to the current directory in your first batch file or call the second batch file by full path.

manyxcxi
WOW, you're right, i was in the wrong directory. facepalm. -_-
splatback