Wildcard GET New File Behaviour

Advertisement

Daniel.Bryars
Guest

Wildcard GET New File Behaviour

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):

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,322
Location:
Prague, Czechia

Re: Wildcard GET New File Behaviour

It works the way you think. May get more complicated if there are some subdirectories.

Reply with quote

Guest

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,322
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

Reply with quote

Advertisement

gnoel.nivlac
Joined:
Posts:
2
Location:
Austin, TX

martin 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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,322
Location:
Prague, Czechia

I have sent you an email.
_________________
Martin Prikryl

Reply with quote

gnoel.nivlac
Joined:
Posts:
2
Location:
Austin, TX

martin 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.

Reply with quote

Advertisement

You can post new topics in this forum