Re: generating empty 1gb files

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Matthias Tacke (Matthias_at_Tacke.de)
Date: 02/17/05


Date: Thu, 17 Feb 2005 21:52:09 +0100

steve wrote:
> Hi all!
>
> Can I use vbscript to generate an empty file that has a specified size?
>
> I know that you can do it by opening a file for writing and then writing
> characters into it until it reaches the desired size.
>
> But can you gneerate the file in some other way so that you can instantly
> generate the file?
>
> I need to generate dummy files that have a size of 1GB.
>
> thanks
>
>
If you are using xp, the fastest way is to use fsutil.exe

fsutil file createnew C:\testfile.txt 1000

where 1000 is filesize in decimal bytes, so if you interpret 1GB
as 1024 * 1024 * 1024 your number is 1073741824.

HTH

-- 
Gruesse  Greetings Saludos   Saluti    Salutations
Matthias
---------+---------+---------+---------+---------+---------+---------+


Relevant Pages

  • generating empty 1gb files
    ... Can I use vbscript to generate an empty file that has a specified size? ... I know that you can do it by opening a file for writing and then writing ...
    (microsoft.public.scripting.vbscript)
  • Re: An appeal for help re: Steve Gough (The Naked Rambler)
    ... Firstly he writes "What is the next step if I have exhausted all the complaints procedure within the prison service, including writing to the prisons Minister? ... It could be as simple as asking for forms from the local Courts, as I presume it must start there. ... either contact me or direct to Steve. ...
    (uk.rec.naturist)
  • Re: Chord progression question in Jazz Hanon
    ... You've given me a lot of help here, Steve. ... I tell my theory students to work backwards! ... cadence is the one thing you know, so it's easier for them to work from the ... were going to say before you actually started writing the sentence and what ...
    (rec.music.theory)
  • Re: An appeal for help re: Steve Gough (The Naked Rambler)
    ... Steve has asked me to see if anyone will come forward to help with some ... complaints procedure within the prison service, ... it must start there (Perth Courts). ... after writing about his plans to appeal as far as he can in the ...
    (uk.rec.naturist)