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

288 views      
Thread locked
 

Messages in this Thread

 
94,426 Postings in 11,918 Threads, 348 registered users, 7 users online (0 registered, 7 guests)
Index | Admin contact |   Forum Time: Sep 17, 2019 - 8:26 am EDT  |  Hits:28,644,673  (673 Today )
RSS Feed