ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Touch command?   [Help!]

By: Ben Kent       
Date: Mar 01,2018 at 21: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

635 views      
Thread locked
 

Messages in this Thread

 
95,607 Postings in 12,059 Threads, 350 registered users, 45 users online (0 registered, 45 guests)
Index | Admin contact |   Forum Time: Oct 18, 2021 - 8:03 pm UTC  |  Hits:43,279,173  (13,809 Today )
RSS Feed