My goal is as follows:
- Write log data to a file called
log.txton a Windows server
- Automatically upload
log.txtto a remote SFTP server using WinSCP triggered by a timed event
- Once the file is uploaded, a process on the remote server will automatically grab and delete the remote
- After upload, the local script will delete the
log.txtfile on the Windows machine
log.txtfile before the local process is automatically triggered again, I will overwrite the remote file, causing data loss.
If the remote
log.txtfile already exists on the SFTP server, I need to be able to append whatever new data is contained in the log.txt file on the local Windows machine to the existing
log.txtfile on the remote server.
log.txtfile on remote server contains:
1111 2222 3333 4444
log.txton the local server contains:
5555 6666 7777
log.txtfile on the remote server that contains:
1111 2222 3333 4444 5555 6666 7777
I have been digging around in the forums for an answer and I see instructions that get me close but I am hoping somebody can clearly document the steps I need to take to make this happen.
Thank you for your time and I look forward to your answer.