Winscp download only new files






















Improve this question. Martin Prikryl k 46 46 gold badges silver badges bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Martin Prikryl Martin Prikryl k 46 46 gold badges silver badges bronze badges. You can also check the remote file modified date without downloading all files with Session. ListDirectory — Rich Moss. RichMoss Yes. But that's what Session.

SynchronizeDirectories does internally. And it does the download for you as well. So it is a way easier to use Session. SynchronizeDirectories , unless you need to customize the process in a way that is is not capable of. Sign up or log in Sign up using Google. Local instead of Session. GetFiles or Session. PutFiles respectively. When the old files are removed from the destination directory, you can instead select the new files based on timestamp.

For that you can use file mask with time constraint. In WinSCP. NET assembly , use TransferOptions. Omega42 wrote: Apologies if this has been asked and answered before, I did have a look through the fourm but couldn't see anything. Omega42 wrote: I'm thinking a external file on local PC with timestamp of last download then when it's next run. Martin, That script using file history is brilliant and almost solves my problem as well.

I worry, though, that the list will become unwieldy quickly. I need to script several high traffic downloads. It seems like the simplest path would be to save the time stamp of the most recent file, get a directory listing, sort by recency, and download those added since the last download.



0コメント

  • 1000 / 1000