Only upload the latest folder (Local -> Remote)

Advertisement

kost82
Joined:
Posts:
1

Only upload the latest folder (Local -> Remote)

Hello,

I need to be able to upload a local folder (created daily) to a remote FTP.

I’ve messed with file masks (i.e. put -filemask=”*>=today” C:\local\ /) and ran into issues where it would upload the latest folder (containing subfiles) but it would also upload the rest of the folders in the directory. (They were empty) I then realized filemasks only works specifically for files, not folders.

I then came across this thread: https://stackoverflow.com/questions/45965395/download-files-newer-than-x-days-from-sftp-server-with-winscp-skipping-folders
- User had the same issue except he was going Remote -> Local whereas I need the opposite, solution was to use powershell

Considering that thread is a couple years old, does WinSCP scripting now support such a feature? Unfortunately I’m a bit of a novice with powershell

Thanks for your time.

Reply with quote

Advertisement

Guest

Re: Only upload the latest folder (Local -> Remote)

Thank you Martin, provided an update in stackoverflow thread and marked your response as the answer.

Reply with quote

Advertisement

You can post new topics in this forum