Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Why does TCC tell me TakeCommand is not loaded?

Aug
197
5
Consider the following contents of my ForEachSubfolder.bat batch file:

@echo off
pushd
for /d %%d in (.) do (
echo Changing to: %%d
cd "%%d"
rem echo %cd%
%*
cd ..
)
popd

I use that to execute a given command in every subfolder of a given root folder. It's a handy way, for example, to do a git pull for every source project underneath a common root. For sake of context, I'm running the command within a TCC tab in Windows Terminal, and for every single sub-folder processed, it emits the following message:

TCC: C:\Users\John\Dropbox\Scripts\foreachsubfolder.bat [9] Take Command is not loaded

For reference, line nine is the closing parenthesis in the block of work to be done for each sub-folder. I'd like to suppress that, and honestly I don't even know why it's telling me that in the first place. Yes, I know TakeCommand is not loaded: is that a problem? A warning? An error?

Thanks in advance for any light anyone can shed on this for me.
 
I am unable to replicate this error, even after changing the (.) to (*). Testing with foreachsubfolder echo Here! %%_cwd

What are you passing to ForEachSubfolder? An external? An alias? Another batch file?
 
First, thanks for trying to reproduce, folks! I appreciate it. Second, to answer your questions:
  1. The most common way I use that batch file is: ForEachSubFolder git pull to obtain the latest source code from a GitHub repo. No aliases involved, no batch files, just an invocation of the Git source control executable git.exe.
  2. I do not have any of the commands aliased. I do, however, actually have some plugins installed.
I saw another thread recently and checked out some of the lovely plugins made available by @Charles Dye--thank you so much for sharing your toys!--leaving a few of them enabled in my plugins directory by default. The contents of my TCMD33\plugins folder include the following:

ByArgs.dll
byargs.html
FunctionHelp.dll
functionhelp.html
FunctionHelp.txt
Say.dll
say.html
Tasks.chm
Tasks.dll
tasks.html

Does that help make sense of it somehow? Again, please forgive my ignorance. Despite being such a long time user, I'd never tried any plugins until maybe a month ago. Cheers!

John
 
First, try starting TCC with the /I startup option (which tells it not to read TCMD.INI, load TCSTART or load any plugins or library functions. If that works, you can use the /II, /IL, /IP, and /IS startup options to narrow down what's causing that message. (See "TCC Startup Options" in the help file for details on those options.)
 
Ah, sorry, I have a few active threads on this board and clicked a link in the email notification URL not realizing it was for the other thread. For the record, starting TCC with the /I switch doesn't make any difference. I'm still getting the same message every time. Sorry for the confusion. Interestingly enough, I have a different machine with an older version of TakeCommand (v31), which doesn't have any plugins loaded, and I see the same issue there. I don't think the plugins are the issue.
 
Aha! I figured it out. I'll post for future reference in case it helps others. A little detective work led me to an alias I had created years ago:

cd=cdd /t

I normally use TakeCommand and like the file explorer pane to stay in sync. But of course TCC will complain that TakeCommand is not loaded when it sees that. I guess I need to figure out a way to do my aliasing conditionally or abandon that one. Thanks for all the help!
 
Back
Top