I suspect this was a bug fixed in OpenSSH. Doing MGET "*" should NOT expand... this would prevent you from being able to retrieve files that had an asterisk in their name. So the SSH writers (not IBM) probably fixed this problem in one of their updates, and when IBM pulled in the newer version into their 5733-SC1 product, they would've gotten that fix.

Can you explain why you can't simply do "MGET *" if you want to retrieve all files in a directory?

On 8/12/2014 12:34 PM, craigs@xxxxxxxxx wrote:
I did more testing on the MGET "*" issue. I tried:
MGET * and got the file fine.
MGET *.txt and got the file fine.
MGET "*" and got the file renamed as *
MGET "*.txt" and got the file renamed as *.txt

So, double quotes and wildcards don't mix anymore. Anyone seen this

----- Forwarded by Craig Strong/DEKKO on 08/12/2014 01:30 PM -----

From: Craig Strong/DEKKO
To: midrange-l@xxxxxxxxxxxx,
Date: 08/12/2014 08:55 AM
Subject: SFTP MGET new restrictions

I would be able to perform the following for years in the QSHELL SFTP:
MGET "*"
After we moved to a new system with the same O/S and same directories
including the /home directories, the MGET "*" still gets the files and
data but names them * (single asterisk). Well, for this application there
is almost always one file. The script and the O/S haven't changed. I
know there are alternatives like expect scripts and doing ls -l to an
outfile and updating the script dynamically. I would like to have this
working like before which seems to be the desired functionality. The
reason for double quotes is that I have a command that places the file to
get in double quotes and uses GET or MGET depending on if an asterisk is
present. I haven't tried MGET "*.txt" or something else yet because it is
difficult to test with the customer.
Theories: SFTP setting file somewhere using defaults after the move to the
new system. SFTP setting file authority has changed. New PTF restricting
single asterisk not being allowed in double quotes.

Any ideas how to be able to use MGET "*" and keep the same names like
before the system move?


Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2015 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact