Welcome!

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

SignUp Now!

How to? What am I doing wrong/not understanding?

May
855
0
I realize that this is kind of a beginner question but because I was brain-damaged some time ago I am now effectively somewhat of a beginner. You see the hard drive on my laptop died and had to be replaced. While I had almost obsessively backed up my data files, I was less obsessed by program files and directories since one has to re-install most programs anyway so the setup programs can write to the registry. So I had (and still have - it was backed up) a TCSTART.btm file in a directory in my path. (This is guaranteed to be true because I can execute it by issuing a "TCSTART" command). However it is not being executed on Take Command/TCC start up - and this is also guaranteed to be true because the last command in the file is a CDD to the D: drive which is not happening. What am I doing wrong/not understanding?
 
I don't believe that simply having it somewhere in the path will work, partly because it may be TCSTART that defines the path. If you haven't specified its location on the Startup tab of the Properties (type option and hit Enter), then I think it has to either be in the installation directory (old school, but that's where I stick mine) or under your profile at C:\Users\<username>\AppData\Local\JPSoft.
 
Well setting the TCStart/TCExit path in the option dialog worked, however it TCC will only execute .btm and not .bat files. I find this strange because I certainly don't remember setting up anything like this in the past; in fact I don't even know where it is set - I looked in the all if the tabs in the OPTION dialog and couldn't find it anywhere. I must admit I find this kind of strange.
 
I'm glad you got it working. :) .BTM files are TCC's native extension, so I'm sure that behavior is normal.
 
Thank you Tea-Time for answering the question as it was asked, but excuse me in my current level of incredible incompetence I got it backwards. I can execute .bat files but not .btm files which are TCC's native extension as you say.
 
No problem! How are you trying to execute them? I believe running them from within TCC should just work, no? You said that TCCSTART.btm did run manually because it was in the path... Perhaps you need to configure the associations so you can double click them in Windows Explorer? There's a file called tccbatch.btm in the installation directory, which should run from a TCC prompt and will prompt to associate TCC with .BAT, .BTM and .CMD files.

Or perhaps you mean that TCC isn't doing filename completion for .btm files? If that's the case, then you might have PathExt enabled on the Startup tab of the Properties, but you don't have the .BTM extension added to the PATHEXT environment variable. I suggest reading up on that setting to determine which bahavior you want.
 
Running them from TCC does not work which is precisely the (strange) problem I am having. And running tccbatch.btm did not fix the problem, nor does manually doing what tccbatch.btm does fix the problem. Behold:
Code:
D:\DOS]dir Test.bat /f
D:\DOS\Test.bat
[D:\DOS]test
Test
[D:\DOS]ren Test.bat Test.btm
D:\DOS\Test.bat -> D:\DOS\Test.btm
  1 file renamed
[D:\DOS]dir Test.btm /f
D:\DOS\Test.btm.
[D:\DOS]test
TCC: Unknown command "test"
[D:\DOS]assoc .btm=TCC.Batch
[D:\DOS]ftype TCC.Batch="%_cmdspec" /c "%%1" %%*
[D:\DOS]test
TCC: Unknown command "test"
[D:\DOS]
As you can see doing the association manually doesn't fix the problem. I suppose I can manually rename the 170 (an exact count) .btm files I have to .bat, but I'd really rather not do that because I actually use the .bat extension for the (very few - only five) batch files that I have that are meant to be run from cmd.exe.
 
Ok, then the problem should be the PathExt option on the Startup tab is checked, but .BTM isn't in your PATHEXT environment variable, so it won't run them. From the help for the PATHEXT environment variable:

Caution: If you set the PathExt configuration option, and fail to set the PATHEXT variable, path searches without an explicit extension will fail as there will be no extensions for which to search! (WindowsXP does define a default value for the PATHEXT variable.) If you set the PathExt configuration option but do not create or modify the PATHEXT variable, TCC will use the one defined by Windows (if any), which will probably not include the .BTM, .REX, .REXX, .PL, .RB, .PY, or .TCL extensions.
 
Thank you Tea-Time, I don't understand how these things happened (PathExt checked in the Option dialog but no PathExt variable) but creating a proper PathExt variable (also including .exe) fixed the problem. And Vince I don't know where the dot after the .btm came from if it was on the test sample at all (I have no way of knowing whether I added that dot when I tried to execute the command because that was in a TCC session with local history that I have since terminated). But thank you for noticing; the problem is fixed now.
 

Similar threads

G
Replies
8
Views
3K
Back
Top