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?
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
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.
|Tags: batch file, directory, filename, script, unix|
|Thread Tools||Search this Thread|
|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|