Jump to content

Empty file creation in a batch file.


Recommended Posts

Posted (edited)

I'm trying to create an empty (0 length) file with a batch script.

The biggest problem is the fact DOS, Windows 98 and Windows 2000 do handle such situations differently.

Windows 2000 will copy a 0 length file with a copy command. On the other hand the Windows 98 or DOS will display "0 files copied" message in such a case.

Windows 98 is able to create an empty file with such a command:

if>empty.txt

Windows 2000 will just say the > character was unexpected here.

I'm trying to find a solution working in DOS, Windows 95, 98 and 2000.

Edited by Sfor

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...