Re: Sorting a remote directory
Many thanks
$directory = $session.ListDirectory($remotePath)
$files = $directory.Files | Sort-Object LastWriteTime -Descending
foreach ($fileInfo in $files)
{
...
}
ls
command will return the listing in the order you want? Thank you