K
K
Konstantin Frolov2015-06-02 10:22:05
File systems
Konstantin Frolov, 2015-06-02 10:22:05

How to create a file of arbitrary size filled with arbitrary data?

Welcome all.
Actually the question itself is in the title: how in windows to create a file of arbitrary size, clogged with arbitrary data? Those. not just zeros or ones? Or how to "generate" many, many, millions of files of various sizes in order to fill the disk to capacity?
Is there software for this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
tplus, 2015-06-02
@nitro80

www.7tutorials.com/3-ways-create-random-dummy-file...

A
Alexey Rytikov, 2015-06-02
@chlp

On Linux I would do this:
In Windows, I use to create empty files of a given size:
But for filled with data ... Maybe something like this:

echo 1 > file
for /L %i in (1,1,1000) do echo %i >> file

L
Leming007, 2018-10-15
@Leming007

PowerShell. Creates a file in C:\Temp, fills C: drive leaving only 10MB:
[io.file]::Create("C:\temp\bigblob.txt").SetLength((gwmi Win32_LogicalDisk -Filter "DeviceID='C :'").FreeSpace - 10MB).Close
Source

V
Vitaly Pukhov, 2015-06-02
@Neuroware

The question is why is this needed? If to clear free space from old data, then you need to google on "wipe disk", but if for some other purpose there is a self-made utility that does just that, then it also checks that what it wrote down and that it then reads it same.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question