Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create an empty file in a script?

0 views
Skip to first unread message

Michael Moser

unread,
Mar 2, 2007, 7:57:39 AM3/2/07
to
As a marker that some script has processed a directory I want to create
an empty file in that directory.
In unix I would use a "touch filename" command to do that.

On windows I tried
echo "" > filename
but that creates a file containing two ". How do I create a truly empty
(i.e. 0 Bytes long) file in a windows batch file?

Michael

Ayush

unread,
Mar 2, 2007, 1:04:42 PM3/2/07
to
Michael Moser wrote ::


Echo. > File


Good Luck, Ayush.
--
Windows XP: http://www.microsoft.com/windows/using/windowsxp/default.mspx

Ayush

unread,
Mar 2, 2007, 1:11:19 PM3/2/07
to
Michael Moser wrote ::

Echo. > Filename will not create an empty file.. to create a true empty
file, use :
type nul > FileName


Good Luck, Ayush.
--
XP-Tips [Create a keyboard shortcut to open a folder] :
http://www.microsoft.com/windowsxp/using/setup/tips/foldershortcut.mspx

Black Baptist

unread,
Mar 18, 2007, 11:21:13 PM3/18/07
to
Michael Moser rambled on in microsoft.public.windowsxp.customize:

C:\>cd storage

C:\Storage>more>>empty.txt

0 new messages