Topic "Wildcard GET New File Behaviour"

Author Message
Daniel.Bryars

Guest


I have a script which runs periodically to move (copy and delete) all files from a remote directory (call it R) to a local one (call it L):

Code:
get -delete -speed=2500 *.* L:\somefiles\


This task typically takes around 6 hours. If during the 6 hour duration a new file is added to R will GET get this too?

I imagine for wildcards GET does something like this:

  1. Get a list of the files in R.
  2. Loop through that list and transfer then delete each file.


If it works like this then that is great for my scenario, because I can gurantee new files won't be added when the script is started, but after that new files may well be. These files take several minutes to create, and I want to avoid WinSCP GETing a file which is partially written.

Can someone clarify how it works please?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
It works the way you think. May get more complicated if there are some subdirectories.
Daniel.Bryars

Guest


Many thanks, that's sufficient for my needs; I don't have sudirectories.
Guest




Quote:
I imagine for wildcards GET does something like this:
Get a list of the files in R.
Loop through that list and transfer then delete each file.


I don't think it downloads files from the list. In my test, it transfers all files (included the new incoming files).

My script is as below:
E:\Progra~1\winscp\winscp.com /console /command "option batch on" "open sftpSite:*********@###.###.###.###" "cd /Inbound" "get -delete *.* E:\Fax_Inbound\ABC_In\" "exit"

Is there any option/param I can use to limit the GET to only download file in a list?

TIA
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Anonymous wrote:
I don't think it downloads files from the list. In my test, it transfers all files (included the new incoming files).

I'm sorry, it just does not make any sense.
_________________
Martin Prikryl
gnoel.nivlac
[View user's profile]

Joined: 2011-05-12
Posts: 2
Location: Austin, TX
prikryl wrote:
Anonymous wrote:
I don't think it downloads files from the list. In my test, it transfers all files (included the new incoming files).

I'm sorry, it just does not make any sense.


Hi, I am the same poster above. Just created a login name.
I am using WinSCP Ver. 4.2.7.758
My test scenario:
Started with 30 files in remote site with files keep coming in.
Launch WinSCP. It downloaded all 30 files plus files that came in later and kept going as long as new files coming in.
It reproduces the same result every time.

I do not want to run the same remote session for all day long (I have inbound files at 24/7). Any suggestion will be helpful.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
I have sent you an email.
_________________
Martin Prikryl
gnoel.nivlac
[View user's profile]

Joined: 2011-05-12
Posts: 2
Location: Austin, TX
prikryl wrote:
I have sent you an email.


Thank you for your support and you are correct that wildcards GET method downloads from the list.
In my case, the WinSCP download is launched every other minute. Since the file generation rate (400 - 500 tif and xml files per minute) is much higher/faster than the download. This caused longer download session during peak hours.
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