1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Stupid, obvious question - launch a BAT with TC

Discussion in 'Support' started by AceDashDog, Sep 20, 2013.

  1. AceDashDog

    Joined:
    Nov 2, 2010
    Messages:
    8
    Likes Received:
    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?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,286
    Likes Received:
    39
    One was is to use ASSOC and FTYPE:

    Code:
    assoc .bat=batfile
    ftype batfile="%_cmdspec" /c "%%1" %%*
    
     
    #2 Charles Dye, Sep 20, 2013
    Last edited: Sep 20, 2013
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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?
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,286
    Likes Received:
    39
    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!
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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.
     
  6. AceDashDog

    Joined:
    Nov 2, 2010
    Messages:
    8
    Likes Received:
    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")?
     
    #6 AceDashDog, Sep 23, 2013
    Last edited: Sep 23, 2013
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    It is - through execution of the TCCBATCH.BTM file included in the installation directory.
     
  8. AceDashDog

    Joined:
    Nov 2, 2010
    Messages:
    8
    Likes Received:
    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
     
  9. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    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.
     
  10. AceDashDog

    Joined:
    Nov 2, 2010
    Messages:
    8
    Likes Received:
    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?
     
  11. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Yes - HELP -> TCC -> Comparing TCC, TCC/LE and CMD
     

Share This Page