Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

No, Session.ListDirectory is the right way. Just sort the result of the method. No need for Session.Output.
lduczmal

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

Re: sorting output of ListDirectory method

Sorry I do not understand. Why would you sort contents of Session.Output? You can sort RemoteFileInfoCollection (RemoteDirectoryInfo.Files) instead.
lduczmal

sorting output of ListDirectory method

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