Re: getting the remote directory listing into a local file
You cannot redirect an individual script commands to a file. You can:
– Redirect whole WinSCP output to a file:
– Redirect remote command to a remote file and download it:
– Enable XML logging and parse the listing out of the XML log:
https://winscp.net/eng/docs/logging_xml
See also https://winscp.net/eng/docs/script_custom_listing_format_csv
– Redirect whole WinSCP output to a file:
winscp.com /command ... > out.txt
– Redirect remote command to a remote file and download it:
call ls > out.txt
and get out.txt
– Enable XML logging and parse the listing out of the XML log:
https://winscp.net/eng/docs/logging_xml
See also https://winscp.net/eng/docs/script_custom_listing_format_csv