Post a reply

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

@cracki: Not yet. None else has asked for this yet.
cracki

Any news on this feature?
cracki

I've just checked something... SetEndOfFile on Win7 seems to be instantaneous too! The whole file appears allocated AND it doesn't need privileges.

It might be sensible to truncate a file to what's really been written.
martin

Re: SetFileValidData, contiguous (non-fragmented) files with no allocation time

Thanks for your suggestion. We will consider it.
cracki

SetFileValidData, contiguous (non-fragmented) files with no allocation time

Hi!

It would be awesome if WinSCP could use this API to tell Windows to allocate a single contiguous file extent. As is, downloaded files can become quite fragmented, e.g. if two files are downloaded in parallel.

The most benefit would be to large files.
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfilevaliddata

Another API, SetEndOfFile, would null out the whole file, which would block the call until that is done. SetFileValidData has some security concerns that WinSCP would pay attention to, but it needs zero time to do its magic.