Hi,
I'm working from command line using the command line version of ScriptFTP (scriptftp_console.exe)
I want to syncronize one file, after SYNC I want to start a bat script. My problem is that I cannot make ScriptFTP quit just after starting the bat file. if the batch file runs the scripftp window does not close, even with the parameter /AUTOCLOSE!
So what I want is:
1: start scriptftp from, cmd line with autoclose
2: after succesful synchronization i want to start another batch file from the scriptftp
3: after starting the other batch scriptftp should close automatically
i hope you can help me.
I'm working from command line using the command line version of ScriptFTP (scriptftp_console.exe)
I want to syncronize one file, after SYNC I want to start a bat script. My problem is that I cannot make ScriptFTP quit just after starting the bat file. if the batch file runs the scripftp window does not close, even with the parameter /AUTOCLOSE!
So what I want is:
1: start scriptftp from, cmd line with autoclose
2: after succesful synchronization i want to start another batch file from the scriptftp
3: after starting the other batch scriptftp should close automatically
i hope you can help me.
Code: Select all
***now the calc for example should start and scriptftp shoul close#
# More script samples at http://www.ScriptFTP.com/examples.php
# Online scripting guide at http://www.ScriptFTP.com/reference.php
# Free technical support at http://www.ScriptFTP.com/contact.php
#
# Remember to save the changes before clicking run on the ScriptFTP window.
SILENT(ON)
# Connect to FTP server
OPENHOST("maserver","myuser","mypass")
SYNC("C:\Temp","/ftp",DOWNLOAD,"*.php")
# Transfer finished, close the connection
CLOSEHOST
EXEC("calc.exe")
Yes, that is the normal behavior. ScriptFTP waits for the other program to finish and then continues the execution of the script. In this case, the next step is to close itself.
But there is a small hack you can do to avoid this. Do the following:
But there is a small hack you can do to avoid this. Do the following:
Code: Select all
This way the new process will be created completely detached from ScriptFTP.EXEC("start calc.exe")
liked Script FTP? Try our other product Email Parser