ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Touch command?   [Help!]

By: Ron Metzger       
Date: Mar 01,2018 at 18:49
In Response to: [Help!] Touch command? (Ron Metzger)

> I may have forgotten, but is there a way to create a size zero
> file
> > with a user specified name?
> > Thanks!
>
> From the command line:
>
> echo( 2>Filename.txt
> . or
> echo. 2>Filename.txt
> . or
> echo 1>NUL 2>Filename.txt
>
> Strategy: issue a command without errors, with redirection, ignoring
> StdOut (1) and to (non-error) to StdErr (2) to the file (Filename.txt).
>

You could even try:
dir Filename.txt 2>Filename.txt
. Volume in drive C is volumename
. Volume Serial Number is ABCD-1234
.
. Directory of C:\adirectory
.
.03/01/2018..01:36 PM..................0 filename.txt
................1 File(s)..............0 bytes
................0 Dir(s)..88,624,267,264 bytes free
(ignore the periods, used for better forum display)

Hope this helps
Ron Metzger

954 views      
Thread locked
 

Messages in this Thread

 
96,656 Postings in 12,233 Threads, 350 registered users, 45 users online (0 registered, 45 guests)
Index | Admin contact |   Forum Time: May 16, 2024 - 1:01 am UTC  |  Hits:63,493,647  (1,149 Today )
RSS Feed