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

414 views      
Thread locked
 

Messages in this Thread

 
95,078 Postings in 11,987 Threads, 350 registered users, 105 users online (0 registered, 105 guests)
Index | Admin contact |   Forum Time: Aug 15, 2020 - 9:30 am EDT  |  Hits:33,138,382  (10,211 Today )
RSS Feed