This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3191|Reply: 0

[windows] Windows creates a file of the specified size

[Copy link]
Posted on 2/14/2024 8:04:51 AM | | | |
Requirements: During the development process, large file content may be required for upload testing, or content with specified file size may be tested in special scenarios.

fsutil is a command that comes with Windows systems, located under the C:\Windows\System32\ directory.

Reference Documentation:The hyperlink login is visible.

Use the fsutil command to create a file of the specified size

The command is as follows:

shouldThe content consists of zeros, the unit of the named file size is byte, 1024Bytes=1kB 1024KB=1MB 1024MB=1GB



Quickly generate multiple files of specified sizes

If you want to generate 10 files of 20M size at once, you can create a batch script create_file.bat, the script content is as follows:

Double-click Run create_file.bat to generate 10 files of 20M size in batches.

(End)




Previous:C# 9.0 New syntax attributes and logic patterns improve the aesthetics of if statements
Next:.NET/C# High performance merges multiple files into a single file
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com