Website Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 31, 2015, 01:49:07 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Large file generator  (Read 29787 times)

Sentinel

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 130
  • Generally confused
    • View Profile
    • www.donationcoder.com
    • Donate to Member
IDEA: Large file generator
« 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.

Designated "proofreading free" zone.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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.

Sentinel

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 130
  • Generally confused
    • View Profile
    • www.donationcoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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.programme...e16/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.  ;)


Designated "proofreading free" zone.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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 :)

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Large file generator
« 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: September 27, 2005, 09:41:49 PM by skrommel »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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 :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Large file generator
« 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.

seedling

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 129
    • View Profile
    • Donate to Member
Re: IDEA: Large file generator
« 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 :)
« Last Edit: September 27, 2005, 11:11:14 PM by seedling »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« 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.donationc...dingSnacks/index.php
« Last Edit: September 27, 2005, 11:17:10 PM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: IDEA: Large file generator
« Reply #11 on: September 27, 2005, 11:36:57 PM »
DFC has now been added to the coding snacks section:
http://www.donationc...dingSnacks/index.php

Sentinel

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 130
  • Generally confused
    • View Profile
    • www.donationcoder.com
    • Donate to Member
Re: IDEA: Large file generator
« Reply #12 on: September 28, 2005, 12:49:17 AM »
Thanks for all the hard work guys!  It is really appreciated.  :up:
Designated "proofreading free" zone.

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,769
    • View Profile
    • Donate to Member
Re: IDEA: Large file generator
« 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]

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,217
    • View Profile
    • Coding Snacks by Lanux128
    • Donate to Member
Re: IDEA: Large file generator
« 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>

fsutil.png



Rekrul

  • Participant
  • Joined in 2006
  • *
  • gravatar avatar
  • Posts: 20
    • View Profile
    • Donate to Member
Re: IDEA: Large file generator
« 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;

http://img27.imageshack.us/img27/239/errorry.png
IDEA: Large file generator


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 8,858
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Donate to Member
Re: IDEA: Large file generator
« 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 :)
- carpe noctem