Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: bat from a bat

HTVi
TV Discussion Newsgroups

bat from a bat
"Carlo" <carletto.m[ at ]NOSPAMgmail.com> 6/14/2007 12:12:04 PM
Hi
i need to launch a .bat from another .bat, i try to do this but after the
execution of the second bat the execution of the first doesnt continue:

(non riesco a lanciare un file bat da un file bat, finita l'esecuzione del
secondo bat non continua l'esecuzione del primo)

[ at ]echo on
ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
torun.bat
del torun.bat
ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
del *.dat

if i comment torun.bat, the second bat, everything goes right
anyone can help me????
thanks


Re: bat from a bat
"Nitro" <trashcan[ at ]supereva.it> 6/14/2007 1:14:09 PM
Dal tuo inglese "maccheronico" ipotizzo tu sia italiano, quindi ti rispondo
in italiano

Che cosa fa' torun.bat ? (posta il listato)
Se in torun.bat esegui solo il comando "pause", cosa succede ?
Hai provato a usare START /B torun.bat al posto di torun.bat ?

I comandi successivi a torun.bat devono essere eseguiti dopo che torun.bat è
terminato o possono essere eseguiti contemporaneamente ?

Bye
Nitro


"Carlo" <carletto.m[ at ]NOSPAMgmail.com> ha scritto nel messaggio
news:ONRBd1nrHHA.1296[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> Hi
> i need to launch a .bat from another .bat, i try to do this but after the
> execution of the second bat the execution of the first doesnt continue:
>
> (non riesco a lanciare un file bat da un file bat, finita l'esecuzione del
> secondo bat non continua l'esecuzione del primo)
>
> [ at ]echo on
> ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
> torun.bat
> del torun.bat
> ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
> del *.dat
>
> if i comment torun.bat, the second bat, everything goes right
> anyone can help me????
> thanks
>
>


Re: bat from a bat
"Carlo" <carletto.m[ at ]NOSPAMgmail.com> 6/14/2007 1:29:08 PM
grazie ho risolto
basta nel primo fare la chiamata al secondo con un
CALL torun.bat
grazie mille a tutti
carlo


"Nitro" <trashcan[ at ]supereva.it> ha scritto nel messaggio
news:%23lgPmXorHHA.4364[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Dal tuo inglese "maccheronico" ipotizzo tu sia italiano, quindi ti
> rispondo
> in italiano
>
> Che cosa fa' torun.bat ? (posta il listato)
> Se in torun.bat esegui solo il comando "pause", cosa succede ?
> Hai provato a usare START /B torun.bat al posto di torun.bat ?
>
> I comandi successivi a torun.bat devono essere eseguiti dopo che torun.bat
> è
> terminato o possono essere eseguiti contemporaneamente ?
>
> Bye
> Nitro
>
>
> "Carlo" <carletto.m[ at ]NOSPAMgmail.com> ha scritto nel messaggio
> news:ONRBd1nrHHA.1296[ at ]TK2MSFTNGP06.phx.gbl...
>> Hi
>> i need to launch a .bat from another .bat, i try to do this but after the
>> execution of the second bat the execution of the first doesnt continue:
>>
>> (non riesco a lanciare un file bat da un file bat, finita l'esecuzione
>> del
>> secondo bat non continua l'esecuzione del primo)
>>
>> [ at ]echo on
>> ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
>> torun.bat
>> del torun.bat
>> ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
>> del *.dat
>>
>> if i comment torun.bat, the second bat, everything goes right
>> anyone can help me????
>> thanks
>>
>>
>
>


Re: bat from a bat
John John <audetweld[ at ]nbnet.nb.ca> 6/14/2007 1:35:22 PM
call torun.bat

http://www.robvanderwoude.com/call.html

John

Carlo wrote:
[Quoted Text]
> Hi
> i need to launch a .bat from another .bat, i try to do this but after the
> execution of the second bat the execution of the first doesnt continue:
>
> (non riesco a lanciare un file bat da un file bat, finita l'esecuzione del
> secondo bat non continua l'esecuzione del primo)
>
> [ at ]echo on
> ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
> torun.bat
> del torun.bat
> ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
> del *.dat
>
> if i comment torun.bat, the second bat, everything goes right
> anyone can help me????
> thanks
>
>

Re: bat from a bat
Neil Pike <neilpike[ at ]compuserve.com> 6/14/2007 1:37:45 PM
Carlo - put "call " in front of the batch file

[ at ]echo on
ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
call torun.bat
del torun.bat
ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
del *.dat

Neil Pike. Protech Computing Ltd



Re: bat from a bat
J Ford 6/15/2007 1:51:01 PM
You can always do the call and that should work, however also check the
'torun.bat' and see if it has any 'exit' syntax in it and remove that.

"Neil Pike" wrote:

[Quoted Text]
> Carlo - put "call " in front of the batch file
>
> [ at ]echo on
> ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
> call torun.bat
> del torun.bat
> ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
> del *.dat
>
> Neil Pike. Protech Computing Ltd
>
>
>
>
Re: bat from a bat
"D.R." <a[ at ]b.c.d> 7/9/2007 9:42:39 PM
If you don't have an exit then a virus could (I suppose) attach itself to
the end of your script, this is why I always add:
exit /b
....at the exit point.

....and this just ends the current script and returns to the caller.

....and also gives you the chance to exit with a status code / errorlevel
code.

....see
help exit

Regards,
Dave.


"J Ford" <JFord[ at ]discussions.microsoft.com> wrote in message
news:889C9469-3C88-40A7-8C2C-7BEC0A564740[ at ]microsoft.com...
[Quoted Text]
> You can always do the call and that should work, however also check the
> 'torun.bat' and see if it has any 'exit' syntax in it and remove that.
>
> "Neil Pike" wrote:
>
>> Carlo - put "call " in front of the batch file
>>
>> [ at ]echo on
>> ftp -i -s:"C:\migration\ftp_get.txt" irrr.rrr.com
>> call torun.bat
>> del torun.bat
>> ftp -i -s:"C:\migration\ftp_put.txt" irrr.rrr.com
>> del *.dat
>>
>> Neil Pike. Protech Computing Ltd
>>
>>
>>
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen