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

windshear

Thanks Martin. Good to know.
martin

Re: Get but skip entire folder if folder timestamp is not new/updated (PowerShell)

No, there's no such option.
You would have to code such logic completely using PowerShell and WinSCP .NET assembly.
windshear

Get but skip entire folder if folder timestamp is not new/updated (PowerShell)

Hello,
Is there a way during a get operation to skip checking for new files in folders if the local folder already exists?
I don't want to compare to existing folders that have a thousand tiny files in them, checking each file individually. I want to just skip the entire folder if it already exists in the local folder.

Current code is like this:
    "open sftp://user:pass@remotesite.com/ -hostkey='xxx'"
    "cd /remotefolder" `
    "lcd C:\localfolder" `
    "get -preservetime=all -neweronly *" `
    "exit"