Re: List of available files to text file
Sorry, I'm not sure what you mean by "directory contents of a specific file". But anyway, whatever it is, it does not look like something that WinSCP can do.
Anyway, since you are using PowerShell, it may be way easier for you to use WinSCP .NET assembly:
https://winscp.net/eng/docs/library
Anyway, since you are using PowerShell, it may be way easier for you to use WinSCP .NET assembly:
https://winscp.net/eng/docs/library