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: Feature: Use directory size from server (if provided)

Thanks for your suggestion. Let's see, if there's a more widespread use of the feature first.
Guest

Feature: Use directory size from server (if provided)

Currently WinSCP has a feature to manually calculate the size of directories. However, a server is able to provide this info too, even though it might be against any (?) specification.

My use case
I wrote my own FTP server to browse SQLite based file systems and I use WinSCP as the client. I implemented the MLSD command to list files/directories. For a file, the response might look like this and is already supported:
Type=file;Modify=20230331155201;Create=20230331155201;Size=1234; example.txt


For a directory it looks like this, but without the Size= param:
Type=dir;Modify=20230331155201;Create=20230331155201; example-dir


If I add the Size= param, WinSCP simply ignores it. So I propose to use this param if provided in the response. Of course, manually calculating the size would still work as usual and simply override any previously stored size.