ls command with wildcard error - Too Many Parameters

Advertisement

DavidEmerson
Joined:
Posts:
2
Location:
New Zealand

ls command with wildcard error - Too Many Parameters

Hi,

I am trying to get a list of files from a remote directory command but I'm getting an error
Too many parameters for command 'ls'
Here is the command line:
"C:\Program Files (x86)\WinSCP\winscp.exe"/script=C:\AATemp\FTP_basFTPScript.txt /log="C:\AATemp\FTP_log.xml"
Here is the script:
option batch on
option confirm off
open sftp://user:passwrd@sftp.sitename.co.nz -hostkey="ssh-rsa xxx="
ls EIEPin *.txt
Close
Exit
(Note the open line has actual details)

After running the script I get following in console:
Too many parameters for command �ls�.
If I run the command without the *.txt then it runs fine. How can I get only the filtered list of files?

Using WinSCP 5.17.7 on Windows 10.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum