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

dev_toor

Re: put command file size

After looking into documentation and source code, looks like there is no switch/option to display transferred size in bytes for size less than 1024 bytes.

I believe the following should do it. Please let me know if this can be considered an enhancement and build into future release.

Before:
        UnicodeString ProgressMessage = FORMAT(L"%-*s | %10d KiB | %6.1f KiB/s | %-6.6s | %3d%%",

          (WidthFileName, FileName,
           static_cast<int>(ProgressData.TransferedSize / 1024),
           static_cast<float>(ProgressData.CPS()) / 1024,
           ProgressData.AsciiTransfer ? L"ascii" : L"binary",
           ProgressData.TransferProgress()));


After:
        UnicodeString ProgressMessage;

        if(ProgressData.TransferedSize < 1024)
        {
          ProgressMessage = FORMAT(L"%-*s | %10d Byte(s) | %6.1f KiB/s | %-6.6s | %3d%%",
          (WidthFileName, FileName,
           static_cast<int>(ProgressData.TransferedSize),
           static_cast<float>(ProgressData.CPS()) / 1024,
           ProgressData.AsciiTransfer ? L"ascii" : L"binary",
           ProgressData.TransferProgress()));
        }
        else
        {
          ProgressMessage = FORMAT(L"%-*s | %10d KiB | %6.1f KiB/s | %-6.6s | %3d%%",
          (WidthFileName, FileName,
           static_cast<int>(ProgressData.TransferedSize / 1024),
           static_cast<float>(ProgressData.CPS()) / 1024,
           ProgressData.AsciiTransfer ? L"ascii" : L"binary",
           ProgressData.TransferProgress()));
        }
dev_toor

put command file size

When using "put" command to upload a file w/ the size less than 1 Kilobyte(1024 bytes), it shows 0 KiB (in red). Is there any switch/option to display that in bytes?

winscp> put licence.txt
licence.txt | 0 KiB | 0.0 KiB/s | binary | 100%

winscp> stat licence.txt
-rw-rw-r-- 0 46 Dec 27 14:47:41 2012 licence.txt