Automate Process to Upload then move

Advertisement

Steveo
Joined:
Posts:
2
Location:
UK

Automate Process to Upload then move

Hello,

Firstly, I will admit my scripting knowledge/experience is very much to be desired. So I'm at the mercy of any kind and intelligent person reading this post.

Here's our scenario.
  1. CSV file is created in a local folder
  2. The CSV file is manually uploaded to a remote SFTP folder
  3. Once the file has been uploaded to the remote SFTP folder, the supplier on the other end will move it (thus the remote folder will then be empty again)
I need to automate the process whereby any file being created in the local folder will be automatically uploaded/transferred to the remote folder, then moved from the local folder to another local folder (for back-up purposes)

I can see there is a built in command "Keep remote directory up to date", which would automatically upload/transfer the csv files from local to remote. But because the supplier moves the files out of the remote folder, it will keep transferring all the old files still sitting in the local folder.

I have found a script to "Transfer, then move local files to another folder". This would solve part of the issue whereby it will automatically move the CSV file from local folder to local 'back-up' folder, but I'd have to manually perform the upload/transfer.

So essentially I need to find a way where soon as the file hits the local folder, it will automatically upload/transfer, then move into the local back-up folder.

Any help is greatly appreciated and I need my hand holding as much as possible.

Thank you for your time,

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,378
Location:
Prague, Czechia

Re: Automate Process to Upload then move

Steveo wrote:

I have found a script to "Transfer, then move local files to another folder". This would solve part of the issue whereby it will automatically move the CSV file from local folder to local 'back-up' folder, but I'd have to manually perform the upload/transfer.
Won't scheduling that script to run frequently do?
See Schedule file transfers (or synchronization) to FTP/SFTP server

Reply with quote

Steveo
Joined:
Posts:
2
Location:
UK

Re: Automate Process to Upload then move

Task Scheduler! Why didn't I think of that before!

I created the "Transfer, then move local files to another folder" script, then schedule to run every 5 minutes. Works a treat.

Thank you!

Reply with quote

Advertisement

You can post new topics in this forum