Topic "trying to exclude directories in simple get command"

Author Message
spm08fsu

Guest


My main goal here is to pull all files that conform to the below mask from /data/outbox. Ive noticed it works but it pulls in additional folders.

Using Winscps "edit File Mask" gui I was able to get this:

monthly*201608*.data; /data/outbox/ | /data/outbox/teamfolder/; /data/outbox/sentfolder/


so the command in the script looks like this:

get -delete -filemask=monthly*201608*.data; /data/outbox/ | /data/outbox/teamfolder/; /data/outbox/sentfolder/ c:\destinationFolder\monthly


I am very unsure of the syntax however, I've tried a bunch of variation of that but still cannot get it to work. It works if I remove the exclusions , but then it pulls in those directories (empty), or in the case of the teamfolder it deletes it. Has anyone gotten this to work and wouldnt mind sharing their syntax?
spm08fsu

Guest


heres the relevant portion of the log


> 2016-08-08 12:37:32.767 Script: get -filemask=monthly*201608*.data| */ /data/OUTBOX/ c:\destination\monthly
. 2016-08-08 12:37:32.767 Listing directory "/ingest/source/*".
> 2016-08-08 12:37:32.767 Type: SSH_FXP_OPENDIR, Size: 26, Number: 523
< 2016-08-08 12:37:32.798 Type: SSH_FXP_STATUS, Size: 29, Number: 523
< 2016-08-08 12:37:32.798 Status code: 2, Message: 523, Server: No such file, Language:
. 2016-08-08 12:37:33.438 Asking user:
. 2016-08-08 12:37:33.438 Error listing directory '*'. ("No such file or directory.
. 2016-08-08 12:37:33.438 Error code: 2
. 2016-08-08 12:37:33.438 Error message from server: No such file")
< 2016-08-08 12:37:33.438 Script: Error listing directory '*'.
< 2016-08-08 12:37:34.079 Script: No such file or directory.
< 2016-08-08 12:37:34.079 Error code: 2
< 2016-08-08 12:37:34.079 Error message from server: No such file
. 2016-08-08 12:37:34.079 Script: Failed
> 2016-08-08 12:37:34.079 Script: close
. 2016-08-08 12:37:34.079 Closing connection.
. 2016-08-08 12:37:34.079 Sending special code: 12
. 2016-08-08 12:37:34.079 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Just add double-quotes:

get -delete -filemask="monthly*201608*.data; /data/outbox/ | /data/outbox/teamfolder/; /data/outbox/sentfolder/" c:\destinationFolder\monthly
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