Topic "Get including subfolders"

Author Message
Guest




First: thx a lot for that great tool! It works fine except a little problem I cannot manage.

I'm getting in trouble using mask and it seems that I got the exact opposite problem that other reported Rolling Eyes

Using a shell command, I just need to dowload all files of some type from a ftp folder, including its subfolders.
But I can't get the files located in the subfolders.

Acc. to the doc:
Quote:
Path Mask
When the mask selects files and it makes sense to select them based on directory, you can extend the mask with a path mask. You should separate the path mask from the filename mask by a slash. For example mask /home/martinp/*.txt matches all text files within the directory. To match all text files within subtree, use mask /home/martinp/*.txt; /home/martinp/*/*.txt1).

I tried many configuration like this:
Code:
/command "option batch abort" "option confirm off" "option include /*/*.txt" "open ftp://myftp.com" "get -delete -resume -preservetime /data/* C:\temp\" "exit"

or that:
Code:
/command "option batch abort" "option confirm off" "option include */; *.txt" "open ftp://myftp.com" "get -delete -resume -preservetime /data/* C:\temp\" "exit"


Or without using the mask:
Code:
 /command "option batch abort" "option confirm off" "open ftp://myftp.com" "get /data/*/*.txt C:\temp\" "exit"

But I cannot get it working.

What I'm I doing wrong?
Thanks in advance
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
What version of WinSCP are you using? Make sure, you have the latest one.

Use just simple mask "*.txt".
Also note that you should use -filemask switch instead of the "option include" (although it is still supported for backwards compatibility).

Code:
get -delete -resume -preservetime -filemask="*.txt" /data/* C:\temp\


If it does not help, please attach a complete log file.
plubarj2

Guest


Thank you Prikryl
Apparently, the version I was running 4.3.9 doesn't like the filemask switch: "Unknowm switch 'filemask'".
I installed the 5.1 and it works great!

Thanks once more for the project and your support. I will donate Very Happy
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