Friday, 15 April 2011

cmd - Change path in file batch -



cmd - Change path in file batch -

i have problem bat:

@echo off set cd1old=%cd% cd /d %~dp0 %cd%\xxx.http.client.exe http://localhost:8081/aaa/comparer/aa/base/aa/compare > debug_aaa_base.xml echo. %cd%\xxx.http.client.exe http://localhost:8081/aaa/comparer/aa/complessi/aa/compare > debug_aaa_complessi.xml echo. echo ****** lancio xxxx ****** %cd%\lancio_xxxx.bat echo.

after piece of code, need run this:

echo ****** sposta files ****** %cd%\elaborazione_aaa_spostamento_files.exe cd /d %cd1old%

but it's not working.. seems first code changes execution path while executing code itself, giving problems sec code block's execution..

in particular, if remove line

%cd%\lancio_xxxx.bat

everything works fine. need run line too!

any suggestions? in advance

best regards

note if phone call .bat one, command processor won´t homecoming caller. calling batch not resume execution, "call" simple goto goes referenced batch file.

if replace

%cd%\lancio_xxxx.bat

with

call %cd%\lancio_xxxx.bat

then after execution of batch file, commands after call line executed too, seems looking for.

batch-file cmd exe

No comments:

Post a Comment