Creating an empty file from WinXP command prompt

Discussion in 'Computer Support' started by Jack B. Pollack, Dec 14, 2006.

  1. Can someone remind me what the WinXP command to create an empty file of X
    size is from the command prompt?

    Thanks
     
    Jack B. Pollack, Dec 14, 2006
    #1
    1. Advertising

  2. Jack B. Pollack

    Evan Platt Guest

    On Thu, 14 Dec 2006 00:38:12 GMT, "Jack B. Pollack" <>
    wrote:

    >Can someone remind me what the WinXP command to create an empty file of X
    >size is from the command prompt?


    From http://www.jsifaq.com/SF/Tips/Tip.aspx?id=7400 :


    If you have the need to create a file of a specific size, and don't
    care about the contents, Windows XP, and greater (Windows NT 5.1+),
    has the fsutil.exe command-line tool.

    The syntax for using fsutil.exe to create a new file is:

    fsutil file createnew FileName Size

    where FileName is the name of the file, such as test.txt, or
    c:\folder\test.doc, and Size is the size of the file in bytes.

    NOTE: This is useful when an old install program fails because too
    much freespace causes its' freespace calculation to overflow.
     
    Evan Platt, Dec 14, 2006
    #2
    1. Advertising

  3. Thanks

    "Evan Platt" <> wrote in message
    news:eek:...
    > On Thu, 14 Dec 2006 00:38:12 GMT, "Jack B. Pollack" <>
    > wrote:
    >
    > >Can someone remind me what the WinXP command to create an empty file of X
    > >size is from the command prompt?

    >
    > From http://www.jsifaq.com/SF/Tips/Tip.aspx?id=7400 :
    >
    >
    > If you have the need to create a file of a specific size, and don't
    > care about the contents, Windows XP, and greater (Windows NT 5.1+),
    > has the fsutil.exe command-line tool.
    >
    > The syntax for using fsutil.exe to create a new file is:
    >
    > fsutil file createnew FileName Size
    >
    > where FileName is the name of the file, such as test.txt, or
    > c:\folder\test.doc, and Size is the size of the file in bytes.
    >
    > NOTE: This is useful when an old install program fails because too
    > much freespace causes its' freespace calculation to overflow.
    >
     
    Jack B. Pollack, Dec 14, 2006
    #3
  4. Jack B. Pollack

    Spuds Guest

    On Thu, 14 Dec 2006 00:38:12 GMT, "Jack B. Pollack" <> wrote:

    >Can someone remind me what the WinXP command to create an empty file of X
    >size is from the command prompt?
    >
    >Thanks


    To create a zero byte file from the command prompt:

    "type wank.txt >x.txt"


    Assuming (1) wank.txt does not exist, and (2) x.txt is the name of the output
    file.

    Ignore this message: "The system cannot find the file specified."
    the output file will still be there.

    --

    "If hooking a car battery up to a monkey's brain will help find the
    cure for AIDS and save somebody's life, I have two things to say...
    the red is positive and the black is negative."

    - Nick DiPaolo
     
    Spuds, Dec 14, 2006
    #4
  5. Jack B. Pollack

    Tester Guest

    On Thu, 14 Dec 2006 08:53:40 -0500, Spuds <>
    wrote:

    >On Thu, 14 Dec 2006 00:38:12 GMT, "Jack B. Pollack" <> wrote:
    >
    >>Can someone remind me what the WinXP command to create an empty file of X
    >>size is from the command prompt?
    >>
    >>Thanks

    >
    >To create a zero byte file from the command prompt:
    >
    >"type wank.txt >x.txt"
    >
    >
    >Assuming (1) wank.txt does not exist, and (2) x.txt is the name of the output
    >file.
    >
    >Ignore this message: "The system cannot find the file specified."
    >the output file will still be there.



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    Tester, Dec 14, 2006
    #5
  6. Jack B. Pollack

    Tester Guest

    On Thu, 14 Dec 2006 08:53:40 -0500, Spuds <>
    wrote:

    >On Thu, 14 Dec 2006 00:38:12 GMT, "Jack B. Pollack" <> wrote:
    >
    >>Can someone remind me what the WinXP command to create an empty file of X
    >>size is from the command prompt?
    >>
    >>Thanks

    >
    >To create a zero byte file from the command prompt:
    >
    >"type wank.txt >x.txt"
    >
    >



    C:\>copy nul zzzz.txt
    1 file(s) copied.

    C:\>dir zzzz.txt
    Volume in drive C has no label.
    Volume Serial Number is 7F24-19FF

    Directory of C:\

    12/14/2006 09:38 AM 0 zzzz.txt

    --
    Posted via a free Usenet account from http://www.teranews.com
     
    Tester, Dec 14, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWNvc3Rl?=

    command prompt opens for a split second

    =?Utf-8?B?TWNvc3Rl?=, Aug 19, 2005, in forum: Wireless Networking
    Replies:
    5
    Views:
    4,940
    =?Utf-8?B?TWNvc3Rl?=
    Aug 21, 2005
  2. Paul Welch
    Replies:
    6
    Views:
    12,142
    ┬░Mike┬░
    Aug 25, 2003
  3. Replies:
    10
    Views:
    3,878
  4. calvin
    Replies:
    0
    Views:
    465
    calvin
    Mar 8, 2006
  5. Aerospace Engineer

    Having Some Trouble Sending My Python File To My Command Prompt

    Aerospace Engineer, Oct 14, 2011, in forum: General Computer Support
    Replies:
    0
    Views:
    971
    Aerospace Engineer
    Oct 14, 2011
Loading...

Share This Page