Overtherailing. RSS

I hope you find the answers faster than I did.

Archive

Mar
22nd
Mon
permalink

Creating files of arbitrary size in Windows

When asked how to do this, my first reaction was to Google for a Windows port of dd. Turns out that since at least Windows XP, there’s been a built-in command line utility capable of this.

FromĀ Microsoft’s fsutil documentation:

Fsutil is a command-line utility that you can use to perform many FAT and NTFS file system related tasks, such as managing reparse points, managing sparse files, dismounting a volume, or extending a volume. Because fsutil is quite powerful, it should only be used by advanced users who have a thorough knowledge of Windows XP. In addition, you must be logged on as an administrator or a member of the Administrators group in order to use fsutil.

Usage is straightforward:

fsutil file createnew c:\test.out 1000000