Posted: 2015-07-02 22:17
$directoryInfo = $session.ListDirectory($somePath)
$files = $directoryInfo.Files
When there is more than one file in $somePath, $files correctly contains a collection (RemoteFileInfoCollection) of files and $files.Length returns the number of files in the collection.
When there is only one file in $somePath, $files contains a single File object instead of a collection of one file. $files.Length returns the size of the file.
Using: SFTP, WinSCP 5.7.3 on Windows 8.1 and PowerShell
Location: Prague, Czechia
I do not think this is true. It's just how the PowerShell presents it. What does
Ntb, if you do
You can post new topics in this forum
And it's free!