Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Downloading only specific files with command script

jericho2 wrote:

I'm getting an error with this line

synchronize local y:\CMR\-filemask="|*/"

Can someone tell me what I need to change to make it work?

There has to be a space between synchronize command parameters and the -filemask switch:
synchronize local y:\CMR\ -filemask="|*/"
jericho2

Re: Downloading only specific files with command script

martin wrote:

The cd command does not transfer anything. It changes a current remote working directory only.
You probably have get command later. Add -filemask="|*/" to that to exclude all subfolders.
See https://winscp.net/eng/docs/faq_script_non_recursive


I'm getting an error with this line

synchronize local y:\CMR\-filemask="|*/"

Can someone tell me what I need to change to make it work?
jericho2

So on the last line of my script would this give me what I want to accomplish?

synchronize local y:\CMR\-filemask="|*/" *
jericho2

Here is the entire script that relates to this ftp download. Maybe someone can tell me what I need to do to ignore any folders below the current working directory.

open cmr
cd "/home/nrtsyndication/nrtsyndication.com/syndication/Christian Music Rewind/"
synchronized local y:\CMR\
close
martin

Re: Downloading only specific files with command script

The cd command does not transfer anything. It changes a current remote working directory only.
You probably have get command later. Add -filemask="|*/" to that to exclude all subfolders.
See https://winscp.net/eng/docs/faq_script_non_recursive
jericho2

Downloading only specific files with command script

First time poster here. I am new to scripts so bear with me. I am trying to edit a script that someone else wrote who used to work here. The problem I am having is that one of the ftp sites has changed and I need to set it up to download file from the new site. In this new site the folder my files are in has a sub folder with archives of past files (its a weekly radio show with audio files) What I need is for only the current week's files to be downloaded and NOT the sub folder.

Here is the command I have currently have.

cd "/home/nrtsyndication/nrtsyndication.com/syndication/Christian_Music_Rewind/"

This command successfully downloads all the files within that subfolder. However there is another folder within the "Christian_Music_Rewind" folder that has large archive files. How can I change this command so it only downloads the audio files within the this specific sub folder and not the other folder another step down?