Topic "sorting output of ListDirectory method"

Author Message
lduczmal
[View user's profile]

Joined: 2013-01-30
Posts: 7
Hi!
Is it possible to sort output ListDirectory() method?
Of course I can do it by manually parsing content of $session.output property, but maybe there is some easiest way... for instance by some optional argument which I pass to listdirectory() method?
Best regards
Luki
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Sorry I do not understand. Why would you sort contents of Session.Output? You can sort RemoteFileInfoCollection (RemoteDirectoryInfo.Files) instead.
lduczmal
[View user's profile]

Joined: 2013-01-30
Posts: 7
In my script I use ListDirectory() method to obtain list of files on server, but it looks from your answer that there is better way for it. I check it. Thank you for hint.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
No, Session.ListDirectory is the right way. Just sort the result of the method. No need for Session.Output.
Advertisements

You can post new topics in this forum






Search Site

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License