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

590 views      
Thread locked
 

Messages in this Thread

 
95,467 Postings in 12,041 Threads, 350 registered users, 157 users online (1 registered, 156 guests)
Index | Admin contact |   Forum Time: Aug 1, 2021 - 5:00 pm UTC  |  Hits:41,330,217  (16,486 Today )
RSS Feed