Topic "How to redirect a directory listing to a file?"

Author Message
[View user's profile]

Joined: 2007-08-28
Posts: 1
Location: Michigan
Is there any way to perform a 'ls' on a remote site and have the output redirect to a file? I am connecting via command line for example:

"C:\Program Files\WinSCP3\WinSCP3.exe" FTPhost "/defaults /command dir"

I have tried redirecting by appending "> C:\test" as well as passing the entire command to "cmd /c" but I never get output.

The previous "How to redirect terminal output of to file" topic doesn't seem to work for me.

WinSCP is 3.8.2, connecting via SFTP(v3)

Running Windows XP Professional SP2.

As an aside I am able to both send and receive files using the above site and get/put syntax so I know that works.

There has to be a way to get at the directory contents.


[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27084
Location: Prague, Czechia
You need to use executable instead of winscp3.exe. See documentation.
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License