2

Is there a (free) Windows commandline program to allocate (that is, reserve) arbitrary space in a NTFS filesystem to an arbitrary filename without actually writing to that space ?

0

1 Answer 1

3

If you don't actually want to use linux-style dd of=name_of_file seek=length_of_file bs=1 count=0, which as far as I can tell should work the same on Windows as on any other POSIX-ish operating system, and should be available through e.g. msys2, or as dd for windows, try:

fsutil file createnew name_of_file size_of_file

I think should work. Don't have a Windows PC at the moment to test.

1
  • While the dd thing does not work on Linux the same as fallocate does (dd creates a sparse file with zero du usage), it does work on Windows (CygWin): It is quick (does not actually write), reduces free filesystem space and creates a du usage as intended. This is what I prefer over the fsutil command because it accepts human readable sizes like 1G which fsutil rejects.
    – Juergen
    Commented Nov 24, 2022 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .