get files from subfolders

Advertisement

feldman_c
Joined:
Posts:
1

get files from subfolders

Hi There. New to Winscp, and I'm struggling to do something that I believe should be simple. I want to login to my SFTP, go to a specific directory and pull files of XML type (*.XML) from all subfolders. When I run the following I get no files because the files are located in many different subfolders. If I do a "cd" and go directly to a subfolder I get my XML file within that specific subfolder. Not sure what I am missing here.

Thanks,
Craig

 # Connect to the host and login using password
 open sftp://username:pw@site.org
 # Change the remote directory
 cd /ecs-app/dcs/application/mainfolder
 # get all the files in the remote directory and download them to a specific local directory
 get *.XML f:\files\Audit\XMLs\    

Reply with quote

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

Re: get files from subfolders

It's

get * f:\files\Audit\XMLs\ -filemask=*.XML

Reply with quote

Advertisement

You can post new topics in this forum