Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to create an empty file in a script?

Windows XP Support


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-03-2007
Member
 
Join Date: Oct 2005
Posts: 24
How to create an empty file in a script?

Earlier I was using Unix where I use to apply "touch filename" command in order to create an empty file in a script. Now I?m on Windows XP and due to some I reason I need to create the same but don?t know how exactly we can create an empty file. So far I have tried ?echo "" > filename? but that doesn?t creates empty file, instead it creates a file with two ?.

Can anyone please tell me how completely empty file on windows?

Reply With Quote
  #2  
Old 02-03-2007
Member
 
Join Date: Sep 2004
Posts: 79
Hello OmJaa, here is what you need to do:

Echo. > File
Echo. > Filename will not create an empty file.. to create a true empty
file, use :
type nul > FileName
C:\>cd storage
C:\Storage>more>>empty.txt
Reply With Quote
  #3  
Old 26-05-2010
Member
 
Join Date: Sep 2004
Posts: 87
Re: How to create an empty file in a script?

fsutil file createnew c:\temp\empty.txt 0

You must be an administrator when using/running fsutil in your script.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows XP Support
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to create an empty file in a script?"
Thread Thread Starter Forum Replies Last Post
How to create CGI script in bash? Mulan Software Development 5 01-09-2010 08:19 PM
Can i create an auto executable jar file for fx script Jona-thon Software Development 5 23-07-2010 03:39 AM
Create bash script for ftp teenQ Operating Systems 4 04-03-2010 07:37 PM
File are not open and empty Huxley Customize Desktop 3 02-02-2009 11:04 AM
How to create a script in a DOS batch file to do a loop? Jon Osborn Windows Server Help 2 27-05-2008 06:41 PM


All times are GMT +5.5. The time now is 04:09 PM.