Re: Get Size of Directory via command line
It's easy with WinSCP .NET assembly and PowerShell
https://winscp.net/eng/docs/library_powershell
https://winscp.net/eng/docs/library_powershell
$files =
$session.EnumerateRemoteFiles(
"/remote/path", $Null, [WinSCP.EnumerationOptions]::AllDirectories)
$size = ($files | Measure-Object -Property Length -Sum).Sum