tcmd crashes in this recursive "for /f" loop

Apr 7, 2010
The attached batch file is just a simple test to echo each directory in PATH on a separate line. Works fine in cmd.exe. tcmd totally crashes. Is it due to the recursion? Or maybe the "for /f" in cmd.exe and tcmd.exe are different? What am I doing wrong?

using version: 15.00.25 x64


  • splitpath.bat
    254 bytes · Views: 102


Staff member
May 14, 2008
That's an ... inefficient way to parse the PATH! It's eating more than 20Mb of stack space, which results in the RTL crashing. TCC will use a lot more stack per recursion level than CMD because (1) TCC supports much larger lines, and (2) TCC has at least 100x more features than CMD.

Is your intention to have a single batch file run in both TCC and CMD? (If you only care about running it in TCC, you can get rid of 90% of your code.)
Apr 7, 2010
Thanks for the reply. Actually, I was just outlining a possible approach for something a bit more complicated and just using path parsing as a starting point. I ended up doing all the work in a perl script embedded in the batch file and then passing the result back to the batch script.

I was just startled by the flat out crash, but figured it was due to the recursion. Thank you for the quick reply.
Similar threads
Thread starter Title Forum Replies Date
Jay Sage TCMD Crashes with "tctoolbar /c /r file" Support 5
A Fixed [23.0.22]: TCMD crashes shortly after start, TCC keeps running in background Support 6
T Closing multi-tab TCMD crashes Support 4
M WAD tcmd.exe crashes and leaves an orphaned tcc.exe process Support 6
D ftp crashes tcmd v12.11 and 13.01 Support 10
rfaquino TCMD 12 always crashes when exiting Support 7
Phileosophos TCMD 10.00.57 crashes for want of python26.dll Support 5
D Bug TCMD /X option Support 6
vefatica TCMD hides itself! Support 3
vefatica Tray min'd TCMD and ACTIVATE Support 6
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
kb6ojs How to? "Specified Account Already Exists" error installing TCMD v27 Support 12
CWBillow TCMD Colors Support 8
Jay Sage Issues With TCMD File Explorer Support 0
C Last TCMD that supports win 7? Support 5
gentzel TCMD background color confusion Support 6
R Upgrade TCMD 19 to TCC 26 Support 1
Alpengreis Remaining TCMD background process (v26) ... Support 19
S Windows Server version not being detected correctly in TCMD 26RC2 Support 9
G TCMD crash when copy Support 3
Joe Caverly DrawVLine results different in TCMD tab and detached TCC Support 11
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
nikbackm TCMD 25 - Unregister older TCMD version Support 2
G Documentation on TCMD.INI Support 9
R New Clear Buffer in TCMD Home Menu Support 2
CWBillow Back up TCMD tabs Support 2
CWBillow Upgrade Windows 10's effect on TCMD and TCC Support 3
DrusTheAxe TCMD 24.02.49 x64 crashed due to DivideByZero :-( Support 4
A After update to 24.02.49, helpfile tcmd.chm hangs when opened Support 0
David McClelland TCMD 24 & Perl - perl thinks it's own executable is ...\TCMD24\TCC.EXE??? Support 3
dcantor How to? Can 32-bit TCC be run on a system with 64-bit TCMD and TCC installed? Support 6
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
vefatica What's TCMD's problem with ^e[0m? Support 13
CWBillow TCMD PowerShell Tab elevated Support 6
A How to? Copy+Paste in TCMD tabs with Ctrl-Shift-Ins? Support 5
vefatica TCMD output invisible on Win10 Support 22
J Moving from TCC v22 to TCMD v24 issues Support 3
RChrismon How to? Copy TCMD.INI to New Version Support 7
rps TCMD OPTIONS dialog Support 2
rps TCMD Tabs priority option setting Support 0
D Can we fix the scaling for TCmd? Support 14
CWBillow TCMD Tab Defs Support 4
A How to? TCMD Configuration Dialog: 'Smooth Scrolling' Option missing? Support 1
A TCMD - Dir Command puts out blank lines? Support 16
P Symantec Endpoint Protection trapped TCMD.EXE and said it contained WS.Reputation.1 (Virus?) Support 3
Emilio III TCMD Tab titles on Insider Windows Support 2
kb6ojs Want to start TCMD v20 with every Windows 10 bootup Support 3
D Tcmd 22.00.42 - annoying desktop refresh Support 47

Similar threads