Page 1 of 1
Batch file won't open specific file path
Posted: 04 Mar 2011 19:43
by jsublime
Hello,
I have a batch file which opens several programs. I'm having trouble with one of the prgrams not loading.
Here is the target path:
@echo off
C:\a\b\c.exe -run NT_NA WIN_32
If I go to \b directory I can't run c.exe without the "-run NT_NA WIN_32"
which seems to be causing a problem with the script. Any advice?
Re: Batch file won't open specific file path
Posted: 05 Mar 2011 05:43
by aGerman
Are there spaces in the path?
Try using the CALL command.
Code: Select all
call "C:\a\b\c.exe" -run NT_NA WIN_32
Regards
aGerman
Re: Batch file won't open specific file path
Posted: 07 Mar 2011 11:51
by jsublime
That doesn't seem to work either. Yes there are spaces in the path.
Re: Batch file won't open specific file path
Posted: 07 Mar 2011 12:37
by aGerman
But you're certain that the arguments -run NT_NA WIN_32 are right?
Re: Batch file won't open specific file path
Posted: 07 Mar 2011 13:32
by jsublime
Yes. And if I go that directory in a command prompt and type c.exe -run NT_NA WIN_32 it will open the program. If I only enter c.exe it will not enter.
Re: Batch file won't open specific file path
Posted: 07 Mar 2011 14:38
by aGerman
Hmm, then you could change the working directory and see what happens.
Code: Select all
cd /d "C:\a\b"
call c.exe -run NT_NA WIN_32
Regards
aGerman
Re: Batch file won't open specific file path
Posted: 07 Mar 2011 15:54
by jsublime
That did it. Thanks alot!