By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!unknown_cmd=C:\Z_UserFiles\JPSoft\BTM_001\UC.BTM
@@ctrl-o=@option
@@ctrl-u=^e@option /u
a=alias
b*ack=*cdd -
c=copy
crunch=tpipe /replace=4,0,0,0,0,0,0,0,0,"\s+?"," " /replace=4,0,0,0,0,0,0,0,0,"\s+?$",""
d=*dir /a /p /m /k /h /ne
desk:=%@shfolder[16]\
dl:=%userprofile\downloads\
docs:=%@shfolder[5]\
dt:=%USERPROFILE%\Desktop
e="C:\Program Files\Multi-Edit 9\Mew32.exe" /SNTCMDEdit
edit="C:\Program Files\Multi-Edit 9\Mew32.exe" /SNTCMDEdit
eexit=e %_tcexit
eini=e %_ininame
estart=e %_tcstart
etc:=%systemroot\system32\drivers\etc\
eval=set ans=%@eval[%$] && echo [ %$ ] = %@comma[%ans]
ff=firefox.exe
gd:=%userprofile\google drive\
help="%@path[%_cmdspec]eviewer.exe" "%@path[%_cmdspec]tchelp.ewriter" %@if['%1' == '',,"index.html?%1.htm"]
ie=iexplore.exe
in=pushd %@full[%1] ^ pushd %@left[2,%@full[%1]] ^ %2& ^ popd ^ popd
kill=do p in /L %$ (taskend /f %p)
l=list
last-modified=*pshell /s "$http = [System.Net.WebRequest]::Create('%1'); $http.Method = 'HEAD'; $http.GetResponse().LastModified.ToString()"
lib:=c:\data\tcclibrary
logoff=reboot /l
logout=reboot /l
look=ffind /dc /f /g %$
nd=md /s %1 && %1\
plug:=c:\data\tccplugins\
progs:=%@shfolder[38]\
prune=iff isdir %1 then %+ del /a: /s /w /x /z %1 %+ else %+ echo %1 is not a directory! %+ endiff
s=start /pgm
shell:=%@path[%_cmdspec]
shutdown=reboot /p
sys:=%@shfolder[37]\
t=type
tc:=%@shfolder[38]\JPSoft\TCMD%@int[%_4ver]\`
tf=dir /[d] /od
u*p=cd ..
unuse=net use %$ /d
use=net use
user:=%userprofile\
v=view
vc64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
whatsnew=help whats-new-in-version-%@int[%_4ver]
win:=%@shfolder[36]\
word=winword.exe
zipdir=unzip.exe -Z -C %$ | list
{1} Sherkaner 2 C:\>alias I grep pd
pd=*pdir /D/A-d/(dymd thmsd a z fpn)
pdm=*pdir /D/A-d/(dymd thmsd a m z fpn)
pdr=*pdir /D/A-d/(dymd thmsd a r z fpn)
pdk=*pdir /D/A-d/(dymd thmsd a k z fpn)
pdrk=*pdir /D/A-d/(dymd thmsd a r k z fpn)
spd=*pdir /D/A-d/S/(dymd thmsd a z fpn)
spdm=*pdir /D/A-d/S/(dymd thmsd a m z fpn)
spdr=*pdir /D/A-d/S/(dymd thmsd a r z fpn)
spdk=*pdir /D/A-d/S/(dymd thmsd a k z fpn)
spdrk=*pdir /D/A-d/S/(dymd thmsd a r k z fpn)
but if it's posted as text - it can be copied and pasted as necessary - no additional apps needed....If you have Microsoft PowerToys installed, you can copy text from any image using the Text Extractor PowerToy (Win+Shift+T)
Joe
: Ways to do a "dir".
@@f5=@dir /J/H/Ou/T/A
@@f6=@dir /J/H/Od/T/A
@@f7=@dir /J/H/Oe/T/A
@@ctrl-f5=@dir /J/H/P/Ou/T/A
@@ctrl-f6=@dir /J/H/P/Od/T/A
@@ctrl-f7=@dir /J/H/P/Oe/T/A
@shift-f5=`dir /J/H/Ou/T/A `
@shift-f6=`dir /J/H/Od/T/A `
@shift-f7=`dir /J/H/Oe/T/A `
@shift-f2=`@dir /V/2/J/H/Ou/A `
@shift-f4=`@dir /V/4/J/H/Ou/A `
@@ctrl-f2=@dir /J/H/P/Ou/A-d/F
@@ctrl-f4=@dir /J/H/P/Ou/A-d/F/S
pd=*pdir /D/A-d/(dymd thmsd a z fpn)
pdm=*pdir /D/A-d/(dymd thmsd a m z fpn)
pdr=*pdir /D/A-d/(dymd thmsd a r z fpn)
pdk=*pdir /D/A-d/(dymd thmsd a k z fpn)
pdrk=*pdir /D/A-d/(dymd thmsd a r k z fpn)
spd=*pdir /D/A-d/S/(dymd thmsd a z fpn)
spdm=*pdir /D/A-d/S/(dymd thmsd a m z fpn)
spdr=*pdir /D/A-d/S/(dymd thmsd a r z fpn)
spdk=*pdir /D/A-d/S/(dymd thmsd a k z fpn)
spdrk=*pdir /D/A-d/S/(dymd thmsd a r k z fpn)
: "New" commands.
calc=echos %@eval[%$]
freee=for %A in (%_ready) do if "%@substituted[%A]"=="0" (free %A)
paths=echo %@replace[;,^n,%PATH]
pwd=for %A in (%_ready) do ( echo ^e[%@colorDeDisco[%A]m%@format[-12,%@label[%A]] %@if["%@substituted[%A]"=="1",*, ]%@cwds[%A]^e[0m )
function substituted=`%@if["%@left[3,%@truename[%1\]]"=="%1\",0,1]`
: Abbreviations - internal commands.
sel=select
dsel=*select /H/Od
esel=*select /H/Oe
sco=*select /H/Ou copy (%1)
cd-=`cd -`
vuela=del /SXYZ
vuela.=vuela .
v=*view
ej=*ejectmedia
ar=*attrib +r
a-r=*attrib -r
sar=*attrib /S +r
sa-r=*attrib /S -r
: Abbreviations - external commands.
7z="C:\Program Files\7-Zip\7z.exe"
e=C:\LDC\TSEPro\g32.exe
g32=C:\LDC\TSEPro\g32.exe
mutf=mutt -f
: Permanent options.
move=*move /R
select=*select /H/Ou
say=*say /A
: Frequent directories.
@@Alt-7 @cdd "%HOMEDRIVE%%HOMEPATH%"
@@Alt-8 @cdd "%HOMEDRIVE%%HOMEPATH%\Documents"
@@Alt-9 @cdd "%HOMEDRIVE%%HOMEPATH%\Downloads"
@@Alt-0 @cdd "%HOMEDRIVE%%HOMEPATH%\Dropbox"
: Miss Cellaneous.
@alt-d=descript.ion
@alt-f=for %a in (*)
@alt-shift-f=for %a in (*
@@alt-g=@grep package *.java
@@alt-shift-g=@grep package *.java
If you have Microsoft PowerToys installed, you can copy text from any image using the Text Extractor PowerToy (Win+Shift+T)
Code:{1} Sherkaner 2 C:\>alias I grep pd pd=*pdir /D/A-d/(dymd thmsd a z fpn) pdm=*pdir /D/A-d/(dymd thmsd a m z fpn) pdr=*pdir /D/A-d/(dymd thmsd a r z fpn) pdk=*pdir /D/A-d/(dymd thmsd a k z fpn) pdrk=*pdir /D/A-d/(dymd thmsd a r k z fpn) spd=*pdir /D/A-d/S/(dymd thmsd a z fpn) spdm=*pdir /D/A-d/S/(dymd thmsd a m z fpn) spdr=*pdir /D/A-d/S/(dymd thmsd a r z fpn) spdk=*pdir /D/A-d/S/(dymd thmsd a k z fpn) spdrk=*pdir /D/A-d/S/(dymd thmsd a r k z fpn)
Joe
:get the Mon-Sun start date of the current week or specified date
WeekStart=` & ^
setlocal & ^
set Arg=%1$ & ^
set d=%@date[%@if[%@len[%Arg] GT 0,%Arg,%_date]] & ^
do while %@dowi[%d] NE 2 (set d=%@dec[%d]) & ^
echo %@makedate[%d] & ^
endlocal`
:get the Mon-Sun end date of the current week or a specified date
WeekEnd=` & ^
setlocal & ^
set Arg=%1$ & ^
set d=%@date[%@if[%@len[%Arg] GT 0,%Arg,%_date]] & ^
do while %@dowi[%d] NE 1 (set d=%@inc[%d]) & ^
echo %@makedate[%d] & ^
endlocal`
:get the first day of the current month or a specified date
MonthStart=` & ^
setlocal & ^
set Arg=%1$ & ^
iff %@len[%Arg] GT 0 then & ^
echo %@makedate[%@date[%@month[%Arg]/1/%@year[%Arg]]] & ^
else & ^
echo %@makedate[%@date[%_month/1/%_year]] & ^
endiff & ^
endlocal`
:get the last day of the current month or a specified date
MonthEnd=` & ^
setlocal & ^
set Arg=%1$ & ^
set d=%@date[%@if[%@len[%Arg] GT 0,%Arg,%_date]] & ^
set dm=%@month[%@makedate[%d]] & ^
do while %@month[%@makedate[%d]] EQ %dm (set d=%@inc[%d]) & ^
set d=%@dec[%d] & ^
echo %@makedate[%d] & ^
endlocal`
:get the quarter given a date or a month arg
GetQuarter=` & ^
setlocal & ^
set Arg=%1$ & ^
iff %@fields["/",%[Arg]] GT 1 .OR. %@fields["/",%[Arg]] GT 1 then & ^
set Quarter=%@eval[%@floor[%@eval[(%@month[%[Arg]] - 1) / 3]] + 1] & ^
else & ^
set Quarter=%@eval[%@floor[%@eval[(%[Arg] - 1) / 3]] + 1] & ^
endiff & ^
echo %Quarter & ^
endlocal`
:get the start month of quarter given a date or a month arg
GetQuarterStart=` & ^
setlocal & ^
set Arg=%1$ & ^
iff %@fields["/",%[Arg]] GT 1 .OR. %@fields["/",%[Arg]] GT 1 then & ^
set Month=%@month[%[Arg]] & ^
else & ^
set Month=%[Arg] & ^
endiff & ^
set Quarter=%@eval[%@floor[%@eval[(%[Month] - 1) / 3]] + 1] & ^
do while %[Month] GT 1 .AND. %Quarter EQ %@eval[%@floor[%@eval[(%@dec[%[Month]] - 1) / 3]] + 1] (set Month=%@dec[%[Month]]) & ^
echo %Month & ^
endlocal`
:get the end month of quarter given a date or a month arg
GetQuarterEnd=` & ^
setlocal & ^
set Arg=%1$ & ^
iff %@fields["/",%[Arg]] GT 1 .OR. %@fields["/",%[Arg]] GT 1 then & ^
set Month=%@month[%[Arg]] & ^
else & ^
set Month=%[Arg] & ^
endiff & ^
set Quarter=%@eval[%@floor[%@eval[(%[Month] - 1) / 3]] + 1] & ^
do while %[Month] LT 12 .AND. %Quarter EQ %@eval[%@floor[%@eval[(%@inc[%[Month]] - 1) / 3]] + 1] (set Month=%@inc[%[Month]]) & ^
echo %Month & ^
endlocal`
WeekStart=%@execstr[WeekStart %1$]
WeekEnd=%@execstr[WeekEnd %1$]
MonthStart=%@execstr[MonthStart %1$]
MonthEnd=%@execstr[MonthEnd %1$]
Quarter=%@execstr[GetQuarter %1$]
QuarterStart=%@execstr[GetQuarterStart %1$]
QuarterEnd=%@execstr[GetQuarterEnd %1$]
:count lines in a set of files
countlines= & ^
iff %@len[%1] GT 0 then & ^
setlocal & ^
set count=0 & ^
for %f in (%$) set count=%@eval[%count + %@lines[%f] + 1] & ^
echo %count & ^
endlocal & ^
endiff
:expand all parameters, including wildcards
expandall= & ^
iff %@len[%1] GT 0 then & ^
setlocal & ^
set result= & ^
for %f in (%$) set result=%result %@quote[%@truename[%f]] & ^
echo %result & ^
endlocal & ^
endiff
expandall=%@execstr[expandall %$]
npp=notepad++ %@expandall[%$]
:open file explorer on the current directory
.= & ^
iff %@len[%1] GT 0 then & ^
start explorer /e,"%$" & ^
else & ^
start explorer /e,"%_cwd" & ^
endiff
:delete a folder tree (arg) after confirmation
deldir= & ^
iff isdir %1 then & ^
echo Delete [%1]? & ^
echos Press Ctrl-Break to abort... & ^
pause > nul & ^
*del /E /K /Q /S /X /Y /Z %1 & ^
echo done & ^
else & ^
echo Invalid directory [%1] & ^
endiff
:List a variety of info for a file arg
verinfoall=for %f in (CompanyName FileDescription FileVersion InternalName LegalCopyright LegalTrademarks OriginalFilename ProductName ProductVersion Build) do echo %f - %@verinfo[%1,%f]
v:\> alias dt:
c:\Users\vefatica\Desktop
START dt:
will give a new TCC with c:\Users\vefatica\Desktop as current directory, while START %@alias[dt:]
will give an Explorer window in c:\Users\vefatica\Desktop. I have no idea how that one works.A new instance of explorer.exe is pretty much what I expected and what I wanted. I just tried this, and on my computer, "start ." and "explorer ." seem to do exactly the same thing.It's a new instance of explorer.exe. That's what you get when you use its (i.e., explorer's) name.
When youSTART .
I think TCC uses ShellExecute/ShellExecuteEx to ask the current shell (explorer) to do something (as opposed to creating an explorer.exe process to do it).
Expediency. The single dot is just much less to type, one character instead of ten.The "verinfoall" looks quite useful, I will add that to my alias list. But I don't get the point of "open file explorer on the current directory". Why not just
explorer .
(A single dot standing for the cwd.)
Expediency. The single dot is just much less to type, one character instead of ten.
If I have a copy of explorer.exe running and visible, and type "start ." I get a new copy of explorer.exe, new window, open to the directory that was the CWD in TCC.
START .
does not give a new instance of explorer here.explorer .
does.;;;;;;;;;;;;; ALIAS ADMINISTRATION STUFF: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ALIAS ADMINISTRATION STUFF: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ALIAS ADMINISTRATION STUFF: ;;;;;;;;;;;;;
realias=alias /r c:\TCMD\alias.lst
readalias=realias
;;;;;;;;;;;;; UNKNOWN COMMAND STUFF: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNKNOWN COMMAND STUFF: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNKNOWN COMMAND STUFF: ;;;;;;;;;;;;;
UNKNOWN_CMD=echo %ANSI_COLOR_ERROR% Unknown command: '%italics%%ANSI_YELLOW%%1$%ANSI_COLOR_ERROR%%italics_off%' %ANSI_RESET% %+ set PAUSE_WINDOW_TITLE=ERROR: %1 %+ call pause-alias
;;;;;;;;;;;;; SINGLE-KEYSTROKE COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; SINGLE-KEYSTROKE COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; SINGLE-KEYSTROKE COMMANDS: ;;;;;;;;;;;;;
@@F2=call speak Carolyn
@@F3=call speak I love you
@@F4=call fix-winamp-normal
@@F5=call fix-winamp-alt
a@@F4=oldcth
a@@F5=randwarp
a@@F6=randht
a__F6=luminati
a@@Shift-F4=spec
a@@Shift-F5=newwarp
;;;;;;;;;;;;; PASSTHROUGH ALIASES TO OVERLOAD EXISTING BUILT-IN/CYGWIN/WINDOWS COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; PASSTHROUGH ALIASES TO OVERLOAD EXISTING BUILT-IN/CYGWIN/WINDOWS COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; PASSTHROUGH ALIASES TO OVERLOAD EXISTING BUILT-IN/CYGWIN/WINDOWS COMMANDS: ;;;;;;;;;;;;;
beep= @call beep.bat
cat= @call cat.bat
cd= @call "cd.bat"
color= @call c:\bat\color.bat
copy= @call c:\bat\copy.bat
cls= @call cls.bat
DEL= @mv %1$ \recycled
du= @call du.bat
diff= @call diff.bat
eset= @call eset.bat
head= @call head.bat
kill= @call kill.bat
label= @call label.bat
more= @call more.bat
mv= @call mv.bat
pause =@call pause-alias.bat
python=@call python.bat
say= @call say.bat
sleep= @call sleep.bat
sort = @call sort.bat
speak= @call speak.bat
sync= @call sync.bat
start= @call start.bat
tail= @call tail.bat
touch= @call touch-alias.bat
tee= @call tee.bat
uniq= @call uniq.bat
window=@call window.bat
wget= @call wget.bat
zip= @call c:\bat\zip.bat
zipp= @call c:\bat\zip.bat
;;;;;;;;;;;;; ABBREVIATE DIRECTORY NAVIGATION: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ABBREVIATE DIRECTORY NAVIGATION: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ABBREVIATE DIRECTORY NAVIGATION: ;;;;;;;;;;;;;
.=call "cd.bat" . %+ call fix-window-title %+ d
..=call "cd.bat" ..
...=call "cd.bat" ... %+ d/w
....=call "cd.bat" .... %+ d/w
;;;;;;;;;;;;; ABBREVIATE BASIC COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ABBREVIATE BASIC COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ABBREVIATE BASIC COMMANDS: ;;;;;;;;;;;;;
d=dir
desc=describe
ed=editpad
h=history
li=list
x=exit
;;;;;;;;;;;;; ALTERNATE NAMES FOR BASIC COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ALTERNATE NAMES FOR BASIC COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; ALTERNATE NAMES FOR BASIC COMMANDS: ;;;;;;;;;;;;;
no=except (%1)
sweep=global/i
;zipp=zip didn't work right
;;;;;;;;;;;;; REDEFINE BASIC COMMAND BEHAVIOR: ;;;;;;;;;;;;;
;;;;;;;;;;;;; REDEFINE BASIC COMMAND BEHAVIOR: ;;;;;;;;;;;;;
;;;;;;;;;;;;; REDEFINE BASIC COMMAND BEHAVIOR: ;;;;;;;;;;;;;
comp=*comp /m
:deltree is a bat file now
gr=grep --text --color=always -i -d skip
md=*md /Nt
netstat=*netstat -an
rd=*rd /Nt
ren=*ren /Nt
;;;;;;;;;;;;; EXTEND BASIC COMMANDS INTO NEW COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; EXTEND BASIC COMMANDS INTO NEW COMMANDS: ;;;;;;;;;;;;;
;;;;;;;;;;;;; EXTEND BASIC COMMANDS INTO NEW COMMANDS: ;;;;;;;;;;;;;
duh=du -h
dg=dir/km|:u8 gr %1$ | cat_fast
clf=d/bs %1$ >clip:
DD=dir/bw *.com;*.exe;*.bat
DDD=ls/x
des=describe %1*.*
hl=h|:u8 list /e/s
ldg=(dir/bs/a:|:u8 gr %1$)
ldgjava=global /i /q if exist *.java grep --color=always -i -H %1$ *.java
LSDG=dir/b|:u8 grep --color=always %1$
mvfast=move /r /g /h /E
psgr=@echo off %+ @tasklist /L |:u8 @gr %1$ |:u8 @call 80
psgrep=psgr
psg=psgr
pg=psgr
pss= tasklist /o /l|:u8 80|:u8 gr -v chrome
PSSh=tasklist /o %1$
PSL= tasklist /o /l %1$
PS8=(tasklist /o /l %1$ |:u8 call 80)
;;;;;;;;;;;;; UNIX ALIASES: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNIX ALIASES: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNIX ALIASES: ;;;;;;;;;;;;;
awk=gawk
cp=copy/r /g
;du handled above
;mv handled above
ps=psl
pwd=*cd
;touch handled above
;;;;;;;;;;;;; APPLE ALIASES: ;;;;;;;;;;;;;
;;;;;;;;;;;;; APPLE ALIASES: ;;;;;;;;;;;;;
;;;;;;;;;;;;; APPLE ALIASES: ;;;;;;;;;;;;;
;catalog=dir
clear=cls
;lock=attrib +r %1
;unlock=attrib -r %1
;;;;;;;;;;;;; UNCATEGORIZED: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNCATEGORIZED: ;;;;;;;;;;;;;
;;;;;;;;;;;;; UNCATEGORIZED: ;;;;;;;;;;;;;
htmd=htmld
htmld=dir *htm*
tpause=*cls %+ type %1$ %+ pause>nul
DIR2=call 4windir
LFF=attrib /e %1$ /s
FF=pushd %+ cd\ %+ attrib /e %1$ /s %+ popd
GBAT=gbatname|:u8 c:\bat\gbat
GMD=*md %1 %+ *cd %1 %+ call gbat
ll=%@SFN["%1"]
LD=call c:\bat\4windir %1$|:u8 c:\util\list /s/e
;;;;;;;;;;;;; OLD STUFF ;;;;;;;;;;;;;
;;;;;;;;;;;;; OLD STUFF ;;;;;;;;;;;;;
;;;;;;;;;;;;; OLD STUFF ;;;;;;;;;;;;;
DG2023fail=@dir/km ::%1$|:u8 gr %1$
:G=c:\bat\g.bat
OLDeset=%COLOR_PROMPT% ^ *eset %1 %2 %3 %4 %5 %6 ^ %COLOR_NORMAL%
ummmmmm=call randblack^generate-and-play-random-midi
grep20051001=c:\util\grep
OLDcopy=*copy /Nt
OLDtasklist=tasklist.exe
oldLLIST=c:\util\list.com %@SFN[%1]
oldGFF=c:\ %+ cd\ %+ attrib /e %1$ /s %+ d:\ %+ cd\ %+ attrib /e %1$ /s %+ e:\ %+ cd\ %+ attrib /e %1$ /s
oldKILL=mv *.* c:\recycled
oldLH=HL
oldLIST=shroom -s c:\ c:\util\list.com %@SFN[%1]
oldLS=call nl %+ call 4windir/bw
oldkill=taskend /f
old_add=echo %@LFN[%1] >>d:\list.tmp %+ tail.exe -5 d:\list.tmp
oldMV=move/r /g /h
oldCLS=melt %+ *cls
oldCOMP=*comp/a
oldoldD=call 4windir
oldd=call fix-window-title %+ dir
LSDGold=dir/b|:u8 grep --color=always %1$|:u8 tail.exe +1
LDGold=(dir/bs/a:|:u8 gr %1$|:u8 tail.exe +1)
:LDGtest=(dir/bs/a:|:u8 gr %1$|:u8 call cygtail -n +1)
oldLIST=c:\bat\list.bat
olderLIST=c:\util\list.com
oldDU=call 4windir/su|:u8 grep "[,\\]"|:u8 tail.exe +1|:u8 list /e/s
oldEDIT=c:\util\e\e.exe
olddgs=ldg
oldnormalLS=call nl %+ call 4windir /bwz