Re: Is there any other way to show a recursive listing of all files and folders in a specific site?
It's for the remote site - so FIND won't work unless I can put username@sftp.host.com and log in with Find - I don't think this is possible.
Sorry, I do not follow. What's the problem? You can login with WinSCP GUI to username@sftp.host.com and use the Find command to list all your files. I do not see how does it NOT cover your requirements.
There's anls -R
option in SFTP - however it looks like the server side disabled it so the command is not recognized.
In what "SFTP"? Do you mean OpenSSH
sftp
command-line client? It does NOT have ls -R
. See https://man.openbsd.org/sftp#ls.
So what I am looking for is a manual recursion that lists out all the files, their sizes and path names (similar to ls -laR) command, but on the remote side, not the local side of the FTP.
Again, that's what WinSCP Find GUI command can do.
Or, if you want to automate the listing. option, you can use
Session.EnumerateRemoteFiles
method of WinSCP .NET assembly. E.g. from a PowerShell script. You can start with this example.
https://winscp.net/eng/docs/library_example_recursive_search_text
Just remove the "download and grep" part.
And add listing of all file attributes. For that see
https://winscp.net/eng/docs/library_session_listdirectory#powershell