Recurcive file download

Advertisement

lightweave
Joined:
Posts:
2

Recurcive file download

Tell me please how can I download files in several directories with the mask below:
*/depron/L0/depron*.dat
full paths is:
/satellites/lomonosov/MVL_000638_2NP1_08_20160609_010516/depron/L0/depron-5757E576.dat
/satellites/lomonosov/MVL_000638_2NP1_08_20160609_010516/depron/L0/depron-5758207C.dat
/satellites/lomonosov/MVL_000638_2NP1_08_20160609_010516/depron/L0/depron-57585697.dat
/satellites/lomonosov/MVL_000638_2NP1_08_20160609_010516/depron/L0/depron-5757D026.dat
...
/satellites/lomonosov/MVL_001036_2NP1_08_20160705_013543/depron/L0/depron-577A3159.dat
/satellites/lomonosov/MVL_001036_2NP1_08_20160705_013543/depron/L0/depron-577A19ED.dat
...
/satellites/lomonosov/MVL_00486_2NP1_15_20160530_093315/depron/L0/depron-574B089E.dat
/satellites/lomonosov/MVL_00486_2NP1_15_20160530_093315/depron/L0/depron-574AB501.dat
...


When I use that mask in GUI to Select files - it selects only directories, but I don't need a whole tree of directories, I only need listed files.

1.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Recurcive file download

It's not really clear what you want, but this may do:

get /some/path/* -filemask=depron*.dat

Reply with quote

Guest

Re: Recurcive file download

martin wrote:

It's not really clear what you want, but this may do:

get /some/path/* -filemask=depron*.dat

Thank you!
That's what I need!
I have just one question - can I use here exclude syntax for directories?
Like this:
get "/satellites/lomonosov* | bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -filemask=*depron/L0/depron*.dat -preservetime

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Recurcive file download

Yes, but like this:

get "/satellites/lomonosov*" -filemask="*depron/L0/depron*.dat| bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -preservetime

Reply with quote

lightweave
Joined:
Posts:
2

Re: Recurcive file download

martin wrote:

Yes, but like this:

get "/satellites/lomonosov*" -filemask="*depron/L0/depron*.dat| bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -preservetime

Thanks a lot!

I try to change "get" command to "synchronise" but I get:

Active session: [1] bril..v@.....

Comparing...
Local '/satellites/lomonosov*' <= Remote '/'
Error listing directory '/satellites/lomonosov*'.
(A)bort, (R)etry, (S)kip: Abort
Error listing directory '/satellites/lomonosov*'.

c:\Program Files (x86)\WinSCP>    

So I decided that I need explicitly set directory names, but how would I do this?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Recurcive file download

The synchronize command needs a specific root folders as its arguments, no wildcards.

If you need to synchronize more folders, either use an include mask:

synchronize "/satellites" -filemask="lomonosov*, *depron/L0/depron*.dat| bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -preservetime

or have one command per folder:

synchronize "/satellites/lomonosov1" -filemask="*depron/L0/depron*.dat| bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -preservetime
synchronize "/satellites/lomonosov2" -filemask="*depron/L0/depron*.dat| bdrg/, bi/, data/, elfin/, imiss/, log/, splitbin/, tus/, uffo/, shok/, shok2/, shok1/, mount/" -preservetime

Reply with quote

Advertisement

You can post new topics in this forum