Jump to content

Recommended Posts

Posted

fsutil can create also larger than 2 GB files: e.g. fsutil file createnew c:\test.bin 3145728000

But what is the sense of fsutil file setvaliddata <size>?

Creating a file with fsutil file createnew is fast, but

If you want to access that file with filewrite it will "clear" the complete content with zeros.

But after fsutil file setvaliddata this will not happen.

Thanks to everyone, problem is solved with these two fsutil.exe calls.

Posted

But what is the sense of fsutil file setvaliddata <size>?

Sometimes the Remarks-section in MSDN is of some use:

You can use the SetFileValidData function to create large files in very specific circumstances so that the performance of subsequent file I/O can be better than other methods. Specifically, if the extended portion of the file is large and will be written to randomly, such as in a database type of application, the time it takes to extend and write to the file will be faster than using SetEndOfFile and writing randomly.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted (edited)

Creating a file with fsutil file createnew is fast, but

If you want to access that file with filewrite it will "clear" the complete content with zeros.

But after fsutil file setvaliddata this will not happen.

Thanks to everyone, problem is solved with these two fsutil.exe calls.

Aha, thanks for the information.

@ProgAndy: thanks also to you for your information!

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...