ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
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.

Code: Select all# # 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")
***now the calc for example should start and scriptftp shoul close
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:
Code: Select allEXEC("start calc.exe")
This way the new process will be created completely detached from ScriptFTP.