Stupid, obvious question - launch a BAT with TC

Nov 2, 2010
8
0
Hi
I've been using this product since it was N-Dos (who remembers that?) and am currently using 4NT which still runs OK on Windows 7. I am looking at TC with some interest, and have installed the demo into a virtual to take a play.

I create a .BAT file, and double click it - but it starts in CMD, not TC. How to I re-route things so my BATs will run in the new environment please?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
Hi
I've been using this product since it was N-Dos (who remembers that?) and am currently using 4NT which still runs OK on Windows 7. I am looking at TC with some interest, and have installed the demo into a virtual to take a play.

I create a .BAT file, and double click it - but it starts in CMD, not TC. How to I re-route things so my BATs will run in the new environment please?

One was is to use ASSOC and FTYPE:

Code:
assoc .bat=batfile
ftype batfile="%_cmdspec" /c "%%1" %%*
 
Last edited:
May 20, 2008
3,515
4
Elkridge, MD, USA
I think the first line ought to be
Code:
assoc .bat=btmfile

BTW, is it still true that execution of .BAT and .CMD files is much slower than of .BTM files due to reading and executing each command from disk one at a time for the former, but reading the whole .BTM file into internal storage at once?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,461
88
Albuquerque, NM
prospero.unm.edu
I think the first line ought to be
Code:
assoc .bat=btmfile

BTW, is it still true that execution of .BAT and .CMD files is much slower than of .BTM files due to reading and executing each command from disk one at a time for the former, but reading the whole .BTM file into internal storage at once?

Other way around -- I wanted the second line to be

Code:
ftype batfile="%_cmdspec" /c "%%1" %%*

though using 'btmfile' in both lines would work too.

The speed difference depends on the volume where the batch file is stored. On a modern hard drive, you probably won't notice a difference; on a floppy disk you probably will. If the batch file is on a network server (e.g. a login script) the difference can be huge!
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Yes, either way will work. But wouldn't it be better to have both batfile and btmfile file types available, so you could change the association alone in case there is a .BAT file which is in that 1% that is incompatible with TCC? Personally, the only .BAT and .CMD files on my system are those created by some installer; I only create .BTM files, so I never had to touch the defaults for .BAT and .CMD.
 
Nov 2, 2010
8
0
Weird, though, I'd have thought it would be obvious to associate at least BTM with TC at installation, as nothing else uses them?

I'll try the final version of the commands above and let you know how I get on :)

Cheers for coming back to me

(Update)

OK, I did that. Fine and dandy, it launches TC (tells me I have several days eval left), but all I get is a 'DOS Box' with a prompt eagerly waiting for me to tell it something. If I type the name of the .BTM, it runs OK, but that's not quite what I had in mind. I want an icon on my toolbar that I run to launch my backup for example. Or the option when I RClick a .BAT to have it offer "Run in TC"

All this works fine on 4NT. So either I'm doing it wrong or has the feature been removed as not modern enough, buddy? :)

Or should I be startuing TC and passing it the .BAT like I do now (C:\4NT\4NT.EXE "c:\programs\safety.bat")?
 
Last edited:
Nov 2, 2010
8
0
Ahhhhhh!!! That all makes perfect sense. Go on, you can let yourself have the pleasure of telling me that that was in the manual, I can take it! :)

Cheers Steve. On with the eval for me :) CHAFF
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Well, technically speaking it is in the README.TXT file, but it is not exactly prominent. It is included only as the very terse description of the TCCBATCH.BTM file under the included files category. It has been too long since using the installer to remember whether or not it gives a hint about the 5 optional use batch files.
 
Nov 2, 2010
8
0
While I'm asking dim questions about documentation, is there anywhere a list of what commands and functions don't appear in the LE product?
 
Similar threads
Thread starter Title Forum Replies Date
M A possibly stupid question about the "del" command... Support 7
M Maybe Maybe I'm being stupid (again), but a simple question... Support 4
M How to? A probably stupid question re "@Files" and Include Lists... Support 2
M How to? A seemingly-stupid question related to the "Shift" command. Support 2
M A probably stupid question about .btm file argument parsing... Support 6
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0
rps Documentation "Copy+Paste+run" question Support 2
vefatica SFTP question Support 17
vefatica Question about IPWorks Support 0
C How to? SHORTCUT question..... Support 6
vefatica TPIPE, crash and question Support 1
C Question / Suggestion Support 1
MickeyF Another TPIPE question Support 6
vefatica Another @EVERYTHING question Support 4
mikea How to? %@everything[] question Support 10
A License Question for Single User Support 5
Jay Sage Help Correction (and Related Question) Support 0
S Elapsed time in TCC prompt question Support 0
H command line parsing question Support 5
C Forum question Support 2
B Newbie here, I have a question. Support 4
J Dumb Question ... Support 4
Timothy Byrd Updating from TC 9 to TC 17 - TCTOOLBAR question Support 2
M A just out of curiosity question re @DiskTotal Support 4
Fross Status Bar Time Question Support 1
C How to? GLOBAL question Support 5
vefatica OT: VisualStudio question Support 1
vefatica Wildcard question Support 4
Dan Glynhampton v15 installer question Support 2
C Move question with Encrypted file... Support 6
C Message Board question Support 1
James Miller How to? filename completion question Support 1
C coding question Support 3
M A just-out-of-curiosity question because it's ... Support 6
Frank question to FOLDERMONITOR Support 14
C Dumb titleprompt question Support 4
M Upgrade Question Support 2
S option /u question Support 19
M Just an out-of-curiosity question re. "Do ... /P ..." Support 31
M How to? An admittedly somewhat silly question regarding elevation... Support 2
M Just an out-of-curiosity question the List command vs. the @Lines function... Support 13
M PDir format question... Support 3
M A question about file compression that is just out of curiosity... Support 2
M How to? A very simple question re. the current line number in a batch file... Support 2

Similar threads