Delete local file after transfer?

Advertisement

vk7krj
Joined:
Posts:
4
Location:
Australia

Delete local file after transfer?

I'm using WinSCP to automatically transfer sstv files from local directory across my network to my web server, it works well. However I would like it to delete the file from the local directory after transfer. There is an option to "Delete files" but when I tried that, it started to delete files from the remote directory – not quite what I had in mind..
Is there an option I am missing when using the "Keep remote directory up to date" window to do this?

Thanks, Ken.

Reply with quote

Advertisement

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

Re: Delete local file after transfer?

The "Keep remote directory up to date" function synchronizes local and remote folders. You do not seem to want that. You seem to want to move all new local files to the server.

You can instead schedule a simple frequent "move" script using put -delete command.
Schedule file transfers (or synchronization) to FTP/SFTP server

If you want to keep the new file detection functionality, the code would more complicated.
See Watch for changes in local folder and upload them to SFTP server.
You just need to change the Session.PutFiles call to pass true to remove parameter.

Reply with quote

vk7krj
Joined:
Posts:
4
Location:
Australia

Re: Delete local file after transfer

Thanks Martin- I had a look at the links, but it all sounds a bit too complicated for my old brain. I think I will just manually delete the files periodically.
The 5 mini-pc's that I run my sstv receivers on only have quite limited storage, hence the need to delete the files locally after transfer to my web server (vk7krj.com).

Ken.

Reply with quote

Advertisement

You can post new topics in this forum