ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Touch command?   [Help!]

By: Ben Kent       
Date: Mar 01,2018 at 16:32
In Response to: [Help!] Touch command? (John Leslie)

> > I may have forgotten, but is there a way to create a size zero
> file
> > with a user specified name?
> > Thanks!
>
> Thanks, but I meant in ZTree!

John

The methods already suggested will work inside of ZTree.

e[X]ecute
copy nul file.ext
or
fsutil file createnew "file.ext" 0
or one of the other suggested methods


But maybe you would prefer to do this

F9 Application menu
Alt-[A]dd
Create empty file
RET
Alt-[E]dit
Paste in this

REM #ZTSet CreateEmptyFileName Name of Zero Length file to create:
if "%CreateEmptyFileName%"=="" goto end
if exist "%CreateEmptyFileName%" goto Exist
:: 2>nul type $$$$$$$.$$$>"%CreateEmptyFileName%"
:: type nul:>"%CreateEmptyFileName%"
:: copy nul "%CreateEmptyFileName%"
fsutil file createnew "%CreateEmptyFileName%" 0
pause
goto end
:Exist
Echo the file [%CreateEmptyFileName%] already exists
:end


Then use the menu item, which will prompt for the filename

Ben

299 views      
Thread locked
 

Messages in this Thread

 
94,580 Postings in 11,930 Threads, 348 registered users, 13 users online (0 registered, 13 guests)
Index | Admin contact |   Forum Time: Nov 17, 2019 - 10:07 am EST  |  Hits:29,151,206  (11,167 Today )
RSS Feed