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
Can I use LOGTO more times in the script?
When I use LOGTO the top of the script and in the middle too, the system stop my script with this message:
***** LOGTO Error #18008: Logging is already activated.

I would like to logging full script in first log file and part of script in second file. Is this possible?
Thanks, but when I use STOPLOG I can't logging full script in first log file and part of script (somewhere in the middle of code) in second file.
Yes, it is possible. You have to use STOPLOG (as Wandrey said, thanks Wandrey) and then call LOGTO again:
Code: Select allLOGTO("C:\path_to\mylogfile1.txt") # # # commands here. output is logged to mylogfile1.txt # # STOPLOG LOGTO("C:\path_to\mylogfile1.txt") # # # more commands here. output is logged to mylogfile2.txt # #
Thanks, but when I use STOPLOG I can't logging full script in first log file and part of script (somewhere in the middle of code) in second file.
ScriptFTP support, to mine he wants an nested of operator LOGTO.
That in the nested operator log it was written to some files simultaneously...
It is really impossible in the given version.

Mihcal, you will receive that that want, if write a log pieces in different files, and in the end will collect them in the combinations necessary to you using EXEC ('copy file1.log+file2.log file.log ')

Excuse for my English, I use machine translation
Don't worry for your bad English, you are welcome to participate in the forum even with a machine translator! :) We will do our best to try to understand you ;)

Regarding to the Michal question, yes, you are right. He meant logging to two log file simultaneously. In that case there is no way, at least using the LOGTO/STOPLOG command. You pointed in the right direction, use the EXEC command to copy the contents of the second log file to the first one, but a better (or celaner) way to do so would be:
Code: Select allEXEC("type logfile2.txt >> logfile1.txt")