Welcome Guest.   Make a donation to an author on the site April 24, 2014, 06:54:41 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Large file generator  (Read 26279 times)
Sentinel
Columnist
***
Posts: 130


Generally confused

View Profile WWW Give some DonationCredits to this forum member
« 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
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
Columnist
***
Posts: 130


Generally confused

View Profile WWW Give some DonationCredits to this forum member
« 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.htm

It 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.  Wink


Logged

Designated "proofreading free" zone.
mouser
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 smiley
Logged
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: September 27, 2005, 05:15:20 PM »

 smiley 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

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
mouser
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 smiley
Logged
mouser
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: September 27, 2005, 09:39:59 PM »

 smiley 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

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
seedling
Charter Member
***
Posts: 129



View Profile Give some DonationCredits to this forum member
« 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! smiley

fixed now smiley

* DFC.rar (317.2 KB - downloaded 830 times.)
« Last Edit: September 27, 2005, 11:11:14 PM by seedling » Logged
mouser
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: September 27, 2005, 11:05:57 PM »

looks like its working great!

seedling, may i put your submission on the coding snacks page here for permanent download: http://www.donationcoder....om/CodingSnacks/index.php
« Last Edit: September 27, 2005, 11:17:10 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 32,701



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: September 27, 2005, 11:36:57 PM »

DFC has now been added to the coding snacks section:
http://www.donationcoder....om/CodingSnacks/index.php
Logged
Sentinel
Columnist
***
Posts: 130


Generally confused

View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: September 28, 2005, 12:49:17 AM »

Thanks for all the hard work guys!  It is really appreciated.  thumbs up
Logged

Designated "proofreading free" zone.
Edvard
Coding Snacks Author
Charter Honorary Member
***
Posts: 2,356



View Profile Give some DonationCredits to this forum member
« Reply #13 on: April 03, 2006, 11:18:32 AM »

Here's another way, using Sysinternals' wonderful Contig

from the website:
Quote
...
 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
Global Moderator
*****
Posts: 6,049



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
Participant
*
Posts: 20

View Profile Give some DonationCredits to this forum member
« Reply #15 on: November 19, 2009, 03:01:43 PM »

smiley 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
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 smiley
Logged

- carpe noctem
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.044s | Server load: 0.11 ]