I have a script file that has been working great as long as I am simply using a wildcard to get all of the files from a directory and placing them in the directory I specify. For my examples, assume the source directory contains two files:
fileabc.zip
and
filexyz.zip
My command looks like the following:
(
X:\Output
is simply a local directory on my computer.)
Now, I need to modify this to use a
-filemask
switch so I can exclude one of the files. I have tried numerous methods of writing the "get" command and I always get an error saying:
Can't get attributes of file 'X:\Output',
No such file or directory.
Error code: 2
Here is a (failing) example of what I have tried:
get -filemask=filea*.zip|filex* "X:\Output\"
Just for further clarification, here is what my entire script looks like:
option batch abort
option confirm off
open sftp://<connection info>
cd /public/mydir
get -filemask=filea*.zip|filex* "X:\Output\"
exit
I am only showing one example of what I have tried. Believe me, I have setup the command, and the script, in multiple forms, using ideas I have been finding on this forum, but with no luck. Can anyone tell me why I cannot get this to work?