|
Sentinel
|
 |
« on: September 27, 2005, 08:51:14 AM » |
|
I would like a simple little utility for creating large test files rather like 'bigfile' under UNIX.
Basically all that should be required is to give the path/filename of the file to create, the file size in bytes/kb/mb etc and the byte to fill the file with from 0-255 (or 00-FF hex).
I have an old DOS utility which does a similar thing but DOS has a few size limitations so a native Windows utility would be great.
|
|
|
|
|
Logged
|
Designated "proofreading free" zone.
|
|
|
|
mouser
|
 |
« Reply #1 on: September 27, 2005, 08:54:06 AM » |
|
skrommel - before you start!!! -> i know this must exist several times over in freeware land.
|
|
|
|
|
Logged
|
|
|
|
|
Sentinel
|
 |
« Reply #2 on: September 27, 2005, 09:01:07 AM » |
|
Yeah, that's what I thought but I've not been having much luck finding one that allows the creation of files with a given binary value. Here is one that is close, but no cigar: - http://www.programmershea...m/zone16/cat288/37062.htmIt seems to only allow creation of files with ASCII characters and only lets you input the file length in bytes, not bytes/kb/mb/gb. If someone does know of such a tool I'd be interested. 
|
|
|
|
|
Logged
|
Designated "proofreading free" zone.
|
|
|
|
|
mouser
|
 |
« Reply #3 on: September 27, 2005, 09:04:11 AM » |
|
good point - it's easy enough to write that if you have some odd requirements regarding the bytevalue you want and the size in nice format, then its a tiny enough request to warrant writing. i'll write this for ya if for some reason the heavens crash down and skrommel doesn't want to 
|
|
|
|
|
Logged
|
|
|
|
|
skrommel
|
 |
« Reply #4 on: September 27, 2005, 05:15:20 PM » |
|
 AutoHotkey really isn't up for this task, being without binary file support, and as a script language it's quite slow, but here goes a version with code stolen from Chris at the AutoHotkey forum. BigByte - Create accurately sized files. Feautures: - Very slow on big files! Much faster on big files! - Create binary or ascii files.  You'll find the downloads and more info at Skrommel Software. Skrommel
|
|
|
|
« Last Edit: September 27, 2005, 09:41:49 PM by skrommel »
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #5 on: September 27, 2005, 05:28:23 PM » |
|
yeah actually i was thinking after i posted that this isnt really a job perfect for autohotkey - it's a good lesson regarding the right tools for the right job - ahk does some very hard stuff so easily, and yet for something like this its just not particularly well suited.
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #6 on: September 27, 2005, 06:06:59 PM » |
|
as a side note: skrommel beware you don't burn out! all of us programmers have to pace ourselves - so feel free to ignore some requests 
|
|
|
|
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #7 on: September 27, 2005, 07:14:35 PM » |
|
btw - this would be a *perfect* programming assignment for someone who is just getting learning programming and wants a little manageble project to try to complete.
|
|
|
|
|
Logged
|
|
|
|
|
skrommel
|
 |
« Reply #8 on: September 27, 2005, 09:39:59 PM » |
|
 And then there's the odd stroke of inspiration... Check out BigByte v1.1! With a little help from DOS it will fill your harddisk a lot quicker! So be careful! It creates a 1 byte file and doubles it until it's big enough, then copies the needed files together and deletes the rest. You'll find the downloads and more info at Skrommel Software. Skrommel
|
|
|
|
|
Logged
|
|
|
|
|
seedling
|
 |
« Reply #9 on: September 27, 2005, 10:47:38 PM » |
|
how about this oops! just a minor error... like it didn't write the file!  fixed now 
|
DFC.rar (317.2 KB - downloaded 755 times.)
|
|
« Last Edit: September 27, 2005, 11:11:14 PM by seedling »
|
Logged
|
|
|
|
|
|
|
mouser
|
 |
« Reply #11 on: September 27, 2005, 11:36:57 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
Sentinel
|
 |
« Reply #12 on: September 28, 2005, 12:49:17 AM » |
|
Thanks for all the hard work guys! It is really appreciated. 
|
|
|
|
|
Logged
|
Designated "proofreading free" zone.
|
|
|
|
Edvard
|
 |
« Reply #13 on: April 03, 2006, 11:18:32 AM » |
|
Here's another way, using Sysinternals' wonderful Contigfrom the website: ... To make a new file that is defragmented upon creation, use Contig like this:
Usage: contig [-v] [-n filename length]
|
|
|
|
|
Logged
|
All children left unattended will be given a mocha and a puppy.
|
|
|
|
lanux128
|
 |
« Reply #14 on: December 06, 2006, 10:33:12 PM » |
|
in WinXP, one can create large files files with the fsutil utility. Syntax: fsutil file createnew <filename> <length>
|
|
|
|
|
Logged
|
|
|
|
|
Rekrul
|
 |
« Reply #15 on: November 19, 2009, 03:01:43 PM » |
|
 And then there's the odd stroke of inspiration... Check out BigByte v1.1! With a little help from DOS it will fill your harddisk a lot quicker! So be careful! It creates a 1 byte file and doubles it until it's big enough, then copies the needed files together and deletes the rest. Just tried this on my old Windows 98SE system (there were no requirements listed, which is generally understood to mean that it works on all versions of Windows) and got the following error when I asked it to create a 20MB file; 
|
|
|
|
|
Logged
|
|
|
|
|
f0dder
|
 |
« Reply #16 on: November 19, 2009, 04:26:47 PM » |
|
Rekrul: seems that the script is pretty NT focused - NT has cmd.exe as shell, whereas Win9x has command.com . The script seems like a pretty damn bad way of generating big files anyway 
|
|
|
|
|
Logged
|
 - carpe noctem
|
|
|
|