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

Start command issue...

Discussion in 'Suggestions' started by mathewsdw, Mar 6, 2011.

  1. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    I don't think this is a support question per se because it works the way it works, but I think it could work better. The issue? The “start” command won’t start batch files that have long file names with spaces in them, even if I put the command name in double quotes. Instead it opens an empty TCC window. In order to run said batch files, I have to do a “dir /x” on them to get their short file names, and I can then start that (although I even have to include the “.bat” extension!). However, this is an issue for me because I have very poor memory (I’m not just saying that; it is a medically diagnosed condition) and I need long file names that are descriptive of what the batch file actually does, and I like to use fairly long file names with spaces in them (I also have rather poor eyesight) so I can remember which batch file I want to use and what it actually does. (I will note that the .bat files run fine from the command line if I don't use the "start" command.) Could this problem please be fixed in an upcoming release??? It’s really annoying to me and is one of the very few complaints I have about this program. (I just sent an example of its power to a friend (again! sadly) to show him how powerful this program is and possibly persuade him to at least try and maybe even actually buy it.)


    TCC 12.01.44 Windows 7 [Version 6.1.7600]
     
  2. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    I've been stung by this before. I believe the solution is to give a quoted
    title before the name of the job to run.

    From the help:

    START always assumes that the first quoted string on the command line is the
    title. If there is a second quoted string it is assumed to be the command.
    As a result, if the name of the program you are starting contains white
    space (and must therefore be quoted), and you don't specify a title, START
    will interpret the first quoted string as the title, not the command. To
    address this, use the /PGM switch to indicate explicitly that the quoted
    string is the program name, or include a title before the program name.

    On Sun, Mar 6, 2011 at 15:55, mathewsdw <> wrote:




    --
    Jim Cook
    2011 Tuesday: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Wednesday.
     
  3. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    An additional point besides Jim's about the correct syntax of the START command is the file extension you use. Once in TCC, it knows that it is to interpret a .BAT file (though much slower than a .BTM file), but it is not the default processor for .BAT files, COMMAND.COM is, unless you explicitly changed file associations (e.g., using tccbatch.btm from the TCC distribution directory).
    --
    HTH, Steve
     
  4. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Jim, you are, of course, correct. Thank you!
     
  5. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Steve, I don't really understand what you are saying. #1. I have not meddled with any of my file associations whatsover, and #2. I regularly write and run .bat files that have things in them that are only meaningful to TCC (IFF, EndIff, Do Whiles, etc.), and I took the time just now to try it again (using the "Start" command with the information Jim gave me) to make sure that I was correct and I was correct. (No surprise, the .bat file does not run correctly if I explicitly run it under cmd.exe)

    - Dan
     
  6. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    ---- Original Message ----
    From: mathewsdw
    | Quote:
    | Originally Posted by Steve Fabian
    | An additional point besides Jim's about the correct syntax of the
    | START command is the file extension you use. Once in TCC, it knows
    | that it is to interpret a .BAT file (though much slower than a .BTM
    | file), but it is not the default processor for .BAT files,
    | COMMAND.COM is, unless you explicitly changed file associations
    | (e.g., using tccbatch.btm from the TCC distribution directory).

    Sorry, your quotation included my RFC standard signature, and thus your response was assumed to be a postscript part of my post and deleted by my mail client. I need to quote it by manual copy-and-paste below.

    | #1. I have not meddled with any of my file associations whatsover, and

    I interpret this to mean you did not use TCCBATCH.BTM to make TCC the program Windows uses automatically to execute .BAT files.

    | #2. I regularly write and run .bat files that have things in them that are only meaningful to
    | TCC (IFF, EndIff, Do Whiles, etc.), and I took the time just now to try it again (using the
    | "Start" command with the information Jim gave me) to make sure that I was correct and I
    | was correct. (No surprise, the .bat file does not run correctly if I explicitly run it under
    | cmd.exe)

    I was referring to two separate points. 1/ If the START command is used without naming TCC.EXE as the program to be executed, and passing the name of the batch file as a command line parameter, in other words, the file name of the batch file is the "program" START is to run, Windows uses its file associations to determine which program is to be used to process the batch file. From your comment I infer that in fact your START command invokes TCC explicitly, so this one of my points is not applicable. 2/ The general rule that if you have 2 identical batch files, one with .BAT extension, the other with .BTM extension, TCC requires a lot more time to execute the .BAT version than the .BTM version, UNLESS the .BAT file contains the command "LOADBTM ON". See HELP topic "loadbtm.htm".
    --
    Steve
     
  7. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Steve, I am not specifying TCC as part of my "start" command, so therefore I would assume that either I ran TCCBATCH.BTM so long ago (I have been a TCMD/TCC user for probably at least 10 years) that I no longer have any recollection of doing it (particularly if it was just running a batch file) whatsoever, and frankly I'm too lazy to try to look up and examine my file associations for what is not a problem. So if they were changed (which is, of course, highly probable), I assume I either did it so long ago that I no longer have any recollection of it or that it was done by the TCMD/TCC installation program. (Honestly regarding the "lazy" comment, I am, as I have mentioned previously, rather disabled and doing that is more work for me than it's really worth.) And when I stated "that I have not meddled" I meant not explicitly using REGEDIT or any facilities that TCC provides (I know it has some, but I don't really remember what they are and, again, I'm too lazy to look it up for what is not a problem.) As to your second point, you are, of course, almost certainly correct but the batch files I write generally run in so little time (less than a second) that I wouldn't notice the difference between a second and half a second, and I am a creature of habit. (Again, this is mostly due to my disabilities and reluctance to do any work that I really don't need to do, and changing my "habits" is far more work than I really want to invest in this matter unless there is a definite significant payback, and there isn't one, as far as I can tell, in this case.) And finally regarding my disabilities, it took me more than an hour to write and edit this note, which is typical for the things that I have to do.

    - Dan
     

Share This Page