Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

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.
kost82

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.