Topic "what is the syntax for recusive get?"

Author Message



I hate to ask this as there is a plethora of documentation available on the 'get' command as well as about masks and path masks. Unfortunately, I haven't managed to perform a recursive get. Can someone help with the syntax?

On a Windows XP box, my directory structure looks like this:


I am using WinSCP and a script file. I wish for the script file to begin with the 'Share' folder and recursively download all the files that end in "*.txt" without knowing what the subdirectories are.

I'm trying different syntax such as:
get *.txt
get Share*.txt
get mask /Share/*/*.txt
get -filemask /Share/*/*.txt
get -filemask "/Share/*/*.txt" c:\temp\winscp\files\

Nothing works so far. Can someone help this newbie?

[View user's profile]

Joined: 2012-11-17
Posts: 6
Location: NJ
try using a synchronize local with a filemask. local says synch the local drive to match the remote, but don't push anything back to the remote

synchronize local c:\temp\winscp\files\ /Share/ -filemask="*.txt"

if you want all of the files, leave off the filemask
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26299
Location: Prague, Czechia
get -filemask=*.txt /Share/*
Martin Prikryl


Thanks gman804 and prikryl. I appreciate the help. Smile

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License