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

YairGOW

Re: A problem with a script :\

Edit: Never mind. This can be done with the Windows Watcher feature in System Scheduler.
martin

Re: A problem with a script :\

If you are using Windows Scheduler, you can set it not to run second instance, if previous is still running.
YairGOW

A problem with a script :\

Hey.

I have a script that will automatically download all new files from a certain directory on my server. I run this script every 5 minutes, so sometimes it happens that while transferring one file(let's call this file 'file A'), more files will appear in this directory, and it seems that if the filenames of the new files are alphabettically prior to that of the file that is already transferring, the script will simultaneously download two files on two different sessions if the download wasn't completed in the 5 minutes window between running the scrip again(file A and a new file that has appeared in the folder - file B - will be downloaded in two different sessions). The problem is that when that happens, if file A has been completely transferred, the script will transfer it again from the second session after the transfer of file B is done. That is to say, it won't recognize that it's already fully transferred file A and will start the download of file A from scratch.

My question is, will there might be a way to avoid this kind of situation? Is there maybe a way to limit WinSCP to connect to only one session at a time from a certain server, so the script won't connect twice to the server, thus preventing the simultaneous downloads.