I currently use ScriptFTP on an AWS instance, to connect to firewalls and routers, using open ports and DDNS.
I'm soon going to be looking at a couple of installs where an external IP won't be available. (Mobile Sim connections, and satellite broadband etc...)
So, my solution is to get my remote hosts to upload logfiles to the server, rather than have the server download them. So I'm creating an .sh script to run on the remote hosts. I want to include this output in my logfile created by ScriptFTP.
What is the best way about this?
Stop Output Logging, Run a custom script to append the downloaded log into the ScriptFTP log, then restart ScriptFTP logging with Append.
Or is there an easier way to import a custom file into the log?
I'm soon going to be looking at a couple of installs where an external IP won't be available. (Mobile Sim connections, and satellite broadband etc...)
So, my solution is to get my remote hosts to upload logfiles to the server, rather than have the server download them. So I'm creating an .sh script to run on the remote hosts. I want to include this output in my logfile created by ScriptFTP.
What is the best way about this?
Stop Output Logging, Run a custom script to append the downloaded log into the ScriptFTP log, then restart ScriptFTP logging with Append.
Or is there an easier way to import a custom file into the log?
Hi,
Yes, I think you have to do that the way you suggested: stop the logging, append the other file and resume logging. For appending file contents you have to use the EXEC command:
Yes, I think you have to do that the way you suggested: stop the logging, append the other file and resume logging. For appending file contents you have to use the EXEC command:
FTP Script
- # start logging
- # Open connection, transfer files etc
- # stop logging
- # append the downloaded log file. Got it from:
- # https://stackoverflow.com/questions/19750653/how-to-append-text-files-using-batch-files
- EXEC('type "C:\Users\Carlos\Desktop\the_downloaded_log_file.txt" >> "C:\Users\Carlos\Desktop\mytestlog.txt"')
- # resume logging
- # continue doing other stuff
liked Script FTP? Try our other product Email Parser