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

A little startup help from an old CLI guy please.

Discussion in 'Support' started by larryalk, May 23, 2011.

  1. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    I am beginning the odyssey of learning tcmd and tcc.

    I used to run 4dos and 4nt where there was a very nice manual
    dated 2004 called "4dos 4nt and Take Command Reference Manual".
    Is there any updated version available?

    I have been reading the TakeCommand.pdf file but it's hard going.
    The manual is over 600 pages and no copy/pasting allowed.

    I am looking for the startup .ini file.
    According to TakeCommand.pdf it should be in the tcmd startup directory (I'm assuming this means the Program Files directory for tcmd) but it is not there.
    Secondly the .pdf advises to look at %localappdata% which is not found with cd %localappdata%

    The .pdf implies that the .ini file is created when the program is installed but maybe not.

    Should I create the startup .ini file with OPTION? Where should it go?

    I also want to start an alias file. Perhaps some of my old 4nt aliases will work - it's quite a large file.

    Please excuse me for asking novice questions. I am used to Linux for the last 10 years and have to regain my old Windows skills. Luckily tcmd and 4nt seem to have been modeled after bash which is quite familiar to me.

    Larry
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,287
    Likes Received:
    39
    The full pathname of the .INI file is in the variable %_ININAME, so you can, for example:

    Code:
    echo %_ininame
    list "%_ininame"
    notepad "%_ininame"
    
    Most configuration can be done through the OPTION dialog, so there's seldom any need to manually edit the .INI file.
     
  3. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    Try echo %_ininame to see at least that file.

    Sent from Cookie's iPhone
    Jim Cook

    On May 23, 2011, at 9:00, larryalk <> wrote:


     
  4. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    I've copied it with notepad.
    This gives me a good start.
    Thanks very much for your help Charles.

    Larry
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    From: larryalk
    | I used to run 4dos and 4nt where there was a very nice manual
    | dated 2004 called "4dos 4nt and Take Command Reference Manual".
    | Is there any updated version available?
    |
    | I have been reading the TakeCommand.pdf file but it's hard going.
    | The manual is over 600 pages and no copy/pasting allowed.

    That's all there is for printable documentation. The online HELP has tons of crossreferences implemented as hyperlinks.

    | I am looking for the startup .ini file.
    | According to TakeCommand.pdf it should be in the tcmd startup
    | directory (I'm assuming this means the Program Files directory for
    | tcmd) but it is not there.
    | Secondly the .pdf advises to look at %localappdata% which is not
    | found with cd %localappdata%

    The full pathname of the .INI file used is available in the TCC internal variable _ININAME - just use the command
    "echo %_ININAME"
    IIRC the localappdata variable is supplied Windows Vista and Windows 7 only. The directory you are looking for is available as %@SHFOLDER[26].

    | The .pdf implies that the .ini file is created when the program is
    | installed but maybe not.
    |
    | Should I create the startup .ini file with OPTION? Where should it go?

    See above.

    | I also want to start an alias file. Perhaps some of my old 4nt
    | aliases will work - it's quite a large file.

    Most of them will work. The ones which relate to old, MS-DOS only features will not.

    | Please excuse me for asking novice questions. I am used to Linux for
    | the last 10 years and have to regain my old Windows skills. Luckily
    | tcmd and 4nt seem to have been modeled after bash which is quite
    | familiar to me.

    Not really. Esp. the term "function" has a very different meaning, more akin to mathematics (and to its use in the BASIC and FORTRAN languages, but not C or C++ usage).
    --
    HTH, Steve
     
  6. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    Thanks for your suggestion Jim.

    Using echo %_ininame
    the response was
    c:\Documents and Settings\lba\Local Settings\Application Data\JPSoft\TCMD.INI
    which is great but I cannot cd to that directory which would be necessary to edit the file.

    I'm missing something very basic here.

    Larry
     
  7. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,287
    Likes Received:
    39
    Quotes around the directory name?

    (If you use tab completion, the quote marks are provided for you automagically.)
     
  8. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    659
    Likes Received:
    8
    cd %@path[%_ininame]

    Joe
     
  9. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0

    I finally got to the Local Settings\Application Data\JPSoft directory!
    It seems you can use cmd.exe and specify administrator rights and submit pasword.

    I don't know how or if it is possible to run tcmd with administrator rights.

    Next I will investigate setting up an alias file in the above JPSOFT directory.

    Larry
     
  10. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    From: Joe Caverly
    | cd %@path[%_ininame]

    cd %@quote[%@path[%_ininame]]
    works better!
    --
    Steve
     
  11. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
    TakeCommand.pdf is the updated version of the manual. And, it does allow copying. The info in the manual is also in the Help.
     
  12. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
    Best to use the Option command rather than editing the ini file. In the old days, I'd edit the ini file, but now I use the Option command.

    You can run TCC as administrator just as you can cmd or any other program. What version of Windows are you using? Windows gives the option when you right-click a shortcut. There is also the /elevated option of the START command.

    You don't need to put your aliases in the same directory as the ini file, although you can. You can use Option > Startup to specify where you want to put your TCStart.btm file and use it to load your aliases. Then put something like

    alias /r AliasFilename

    in your TCStart.btm.
     
  13. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    Thanks very much David.

    I'll try Option although I'm comfortable with editing such files.

    My Windows right now is XP but I'll be loading Win 7 Professional in a few days since XP is a little obsolete.

    My alias file will probably have to be completely rewritten so the old XP aliases will run under W7.

    Larry
     
  14. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    Thanks David. I'll find out how because I like to copy tidbits into my own files.

    Larry
     
  15. Kachupp

    Joined:
    Aug 9, 2009
    Messages:
    133
    Likes Received:
    0
    Manual editing of tcmd.ini has been discouraged for a long time now



     

Share This Page