[OT] Creating large files for testing purposes

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

[OT] Creating large files for testing purposes

Post by *robinsiebler »

I need a tool to create large files for testing. Basically, I want to crate a file that will take up all of the free space except for specified amount. In other words, I want to be able to say, create a file that will fill up my hard drive but leave X amount free.

There used to be tools like this around, but now that I need one, of course I can't find one.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
Sosna
Member
Member
Posts: 143
Joined: 2006-10-24, 10:52 UTC

Post by *Sosna »

well, this big files are called DUMMY files, look for Dummy files creator, something like this: http://www.mynikko.com/dummy/
Ave Caesar Imperator,
moritari te salutant!
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

robinsiebler
If you are working in WinXP and are not against some use of Calculator, you can count the necessary size in it, and then use
fsutil file createnew file_name file_size
(fsutil is a standard tool that comes with WinXP).
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

U have simple console calcualtor that you can use along with fsutil to create batch file for this.

See SET /A command

/A = arithmetic


To get free disk space parse dir output, to get last line

dir windows* | more +7
this called in C will show you one line (if you have windows folder)
  • 1 Dir(s) 45.711.081.472 bytes free
You can then use for command to get only the number of free bytes that you can then multiply with some procentage to get desired file size to feed into fsutil

Code: Select all

for /F "tokens=3" %i in ("               1 Dir(s)  45.711.081.472 bytes free") do echo %i
This will output : 45.711.081.472

Don't forget to remove dots :)

Maybe its easier to use freedisk command from WIn Resource Kit...
Habemus majkam!
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

How about RAM?

Post by *robinsiebler »

Thanks!

I want to do the same for RAM. I managed to find 2 options, 1 free, 1 relatively cheap:

Low Memory Tester 2.33 ($10)
Memory Allocation Tool
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

Well, you could use one of those RAM Disks maybe, if it alocates memory dynamicaly.

If not, then I am afraid you will have to write some code..... or use that relatively free app from codeproject
Habemus majkam!
Post Reply