Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Re: Get Size of Directory via command line

It's easy with WinSCP .NET assembly and 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
STetters

Get Size of Directory via command line

Using the properties option within the GUI, you can click on the calculate button and get the size of the folder including sub folders.


Is there any way of getting this same information using the CLI ?

Many thanks

Steve