A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Customizing Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to create an empty file in a script?



 
 
Thread Tools Display Modes
  #1  
Old March 2nd 07, 12:57 PM posted to microsoft.public.windowsxp.customize
Michael Moser
external usenet poster
 
Posts: 99
Default How to create an empty file in a script?

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

Ads
  #2  
Old March 2nd 07, 06:04 PM posted to microsoft.public.windowsxp.customize
Ayush
external usenet poster
 
Posts: 3,114
Default How to create an empty file in a script?

Michael Moser wrote ::
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



Echo. File


Good Luck, Ayush.
--
Windows XP: http://www.microsoft.com/windows/usi...p/default.mspx
  #3  
Old March 2nd 07, 06:11 PM posted to microsoft.public.windowsxp.customize
Ayush
external usenet poster
 
Posts: 3,114
Default How to create an empty file in a script?

Michael Moser wrote ::
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?


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/u...rshortcut.mspx
  #4  
Old March 19th 07, 03:21 AM posted to microsoft.public.windowsxp.customize
Black Baptist
external usenet poster
 
Posts: 76
Default How to create an empty file in a script?

Michael Moser rambled on in microsoft.public.windowsxp.customize:

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


C:\cd storage

C:\Storagemoreempty.txt
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.