Another TCMD "crash" situation...

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I have a .bat file that scans an entire hard disk (or directory of the user’s choosing) looking for .zip files and doing certain things to them (I'm not being specific because it is a long and rather complex .bat file - although I would be OK with e-mailing it to anybody that is interested). The .bat file basically starts out with "For /R %Drv /D %Dir in (*) Do (For %File in ("%Dir\*.zip") Do (Call Z:\CZT7Z FILE "%File"))" (It calls itself recursively (it only goes one level deep) to make coding somewhat easier and the keyword "FILE" is used to indicate that it should execute the one-level deep code.) Problem is this – apparently when my directory structure goes too deep (I think that’s what is causing it, but I’m not sure) Take Command crashes and then restarts. (As another possibility, it may be because the length of the full path of the directory it is currently handling becomes too long.) Just reporting a bug. (Said with some humor: In my view a program that crashes anytime is, by definition, buggy - programs should never crash for any reason whatsoever - and I (mostly successfully) write my own code (C++ and Visual Basic) with that standard in mind. However, I want to assure you that I don't expect every program (including my own, unfortunately) to always meet that standard.)
<O:p</O:p
 

rconn

Administrator
Staff member
May 14, 2008
10,100
85
#2
> I have a .bat file that scans an entire hard disk (or directory of the
> user's choosing) looking for .zip files and doing certain things to
> them (I'm not being specific because it is a long and rather complex
> .bat file - although I would be OK with e-mailing it to anybody that is
> interested). The .bat file basically starts out with "For /R %Drv /D
> %Dir in (*) Do (For %File in ("%Dir\*.zip") Do (Call Z:\CZT7Z FILE
> "%File"))" (It calls itself recursively (it only goes one level deep)
> to make coding somewhat easier and the keyword "FILE" is used to
> indicate that it should execute the one-level deep code.) Problem is
> this - apparently when my directory structure goes too deep (I think
> that's what is causing it, but I'm not sure) Take Command crashes and
> then restarts.
I presume you mean that TCC crashes (since Take Command couldn't have any
involvement with batch file execution). The restart is odd, since there's
nothing in TCC that could cause a restart after a crash. (Only Windows
could do that.)

I can't even begin to guess at the problem without seeing a batch file that
can reliably reproduce the crash. Please email me your batch file
(preferably with the unrelated complexity removed).

Rex Conn
JP Software
 
#3
I presume you mean that TCC crashes (since Take Command couldn't have any
involvement with batch file execution). The restart is odd, since there's
nothing in TCC that could cause a restart after a crash. (Only Windows
could do that.)

I can't even begin to guess at the problem without seeing a batch file that
can reliably reproduce the crash. Please email me your batch file
(preferably with the unrelated complexity removed).

Rex Conn
JP Software
Rex,

I'd be glad to send you the .bat file, but it is not really possible for me to remove that complexity because I don't really have a clue as to where in that complexity TCC is crashing. Also, the .bat file depends on two executables that you may not have available to you, so I will zip them up also and send them with the .bat file. Unfortunately, I've made dozens of changes to the .bat file over time, and it hasn't crashed in several hours. But I'll zip it up with the two needed executables and you can do with it as you will.

As far as the TCC "restart" is concerned, that is very definitely occuring, I know this because it has happened dozens of times at this point, and the "restarted" TCC is not in a "Take Command" window, which is kind of a pain, if I do say so myself.
 

Attachments