Topic "Wait for file being stable before transferring"

Author Message
myriad_rocker

Guest


I've made a script that works great for transferring files from Windows to Unix. Files are downloaded via another tool and then I have a scheduled task that runs every three minutes to move the files via the script. However, I'm concerned that WinSCP will try to transfer the file before it has completed downloading.

So, is there a parameter or switch that I can use to make sure the file is stable before it gets transferred? In other words, just skip the file if it's not stable. Just wait until next time.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Cannot you schedule both tasks in sequence, so you are sure thay do not overlap?
Or make you tool download the files to temporary location and than quickly move them to the place, where WinsCP picks them.
_________________
Martin Prikryl
myriad_rocker

Guest


prikryl wrote:
Cannot you schedule both tasks in sequence, so you are sure thay do not overlap?
Or make you tool download the files to temporary location and than quickly move them to the place, where WinsCP picks them.

The download tool is a continuous Windows service. It is also a corporate solution, so where it downloads is where I have to pull it from. I just want to make sure the file has not been written to or "touched" in the last minute or so. Can I not do that?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
myriad_rocker wrote:
The download tool is a continuous Windows service. It is also a corporate solution, so where it downloads is where I have to pull it from. I just want to make sure the file has not been written to or "touched" in the last minute or so. Can I not do that?

Not directly with WinSCP. But you can write a wrapper script that would check the file timestamp before running WinSCP script.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License