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

Thanks from larryalk was Cannot apply Start in folder for Tcmd

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

  1. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    After 15 replied to my thread "Cannot apply Start In folder for Tcmd"
    but it appears that only 8 replies are viewable by me.
    I think Jpsoft cut me off for some reason.
    Emailed them but no answer yet.
    Luckily I was subscribed to the Jpsoft mailing list and all the email came
    through there.

    I'm starting this new thread since a number of people mentioned
    that some of the things I said were confusing.

    First I want to thank all the people who replied.
    Your answers helped me a great deal and I now have tcmd working
    as designed with both the tcmd.ini and my alias file tcstart.btm in
    \Program Files\Jpsoft\tcmd12\ where they seem to be happily living.

    As you can see by the short listing, I have come a long way since Wednesday.

    Thank you gentlemen for giving me a very nice start.

    Larryalk
     
  2. larryalk

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

    rem tcstart.btm startup alias and color file

    : Directory Targets
    : -----------------
    alias ~=\Documents and Settings\lba
    alias pf="c:\program files"
    alias ho*me="c:\documents and settings\lba"
    alias ro*ot=cd \
    alias myd="c:\Documents and Settings\lba\My Documents"
    alias dl="c:\Documents and settings\lba\Downloads"



    : Common Commands
    : ---------------
    alias al=alias
    alias des=descriibe
    alias v=vim : vim editor
    alias x=exit


    : Linux Commands
    : --------------
    rem alias al=if[%# eq 0, *alias | *list /s,*alias %$]
    : This is an old alias from NT and doesn't work in tcmd.

    alias pwd=cd
    alias grep=ffind /hkm /tstring



    : DIR Aliases
    : -----------
    : /h is hide dots, /k is hide header, /m is hide footer eg: /hkm
    : /1 (one column) /L (Lower Case)
    : /2 )two column) /M (Hide Footer)
    : /4 (four columns) /N (Normal LFN display)
    : /A (Attribute Slct) /O (Order)
    : /B (Bare) /P (Pause)
    : /C[HP] (Compression) /B (Disable Wrap)
    : /D (Disable Color) /S (Subdirectories)
    : /E (Use Upper Case) /T (Attributes)
    : /F (Full Path) /U (Summary Information)
    : /G (Allocated Size) /V (Vertical Sort)
    : /H (Hide Dots) /W (Wide)
    : /I (Descriptions) /X (Display short plus long names)
    : /J (Justify Names) /Z (use FAT format)
    : /K (Suppress Header) /M (Hide Footer)


    alias ls=*dir /w : ls no details
    alias ll=*dir : ll all details

    alias lt=*dir /o-d : lt sorted by time
    alias lk=*dir /o-s : lk sorted by size
    alias ld=*dir /wad : ld shows directories only
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    We did respond to you at 12:30 this afternoon -- double check your mailbox (and your junk folder).

    You weren't cut off; the window only shows 8 messages at a time.

    Click on "More replies below current depth..." and you'll see the rest of the messages.
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Code:
    alias al=`%@if[%# eq 0, *alias | *list,*alias %$]`
    
    You just need a %@ at the start of the %@IF function, and strong quotes around the entire definition so it isn't expanded immediately.
     
  5. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    Thank you very much for the fix to my old NT alias.

    There is one final pressing question.

    In c:\Program Files\JPSoft\tcmd10
    I have the file tcstart.btm
    which has only the following two lines:
    unalias *
    alias /r c:\Documents and Settings\larry\alias.lst

    In c:\Documents and Settings\larry
    I have the file alias.lst which contains my aliases.

    I only have a few aliases in the file but get an error message.

    Start error msg:
    -------------------
    TCC 12.10.66 Windows XP [Version 5.1.2600]
    Copyright 2011 Rex Conn & JP Software Inc. All Rights Reserved
    Registered to Lawrence Alkoff

    unalias *
    alias /r c:\Documents and Settings\larry\alias.lst
    TCC: (Sys) C:\Program Files\jpsoft\tcmd12\TCSTART.btm [4] The system cannot find the file specified.
    "C:\Documents"
    [C:\Documents and Settings\larry\Desktop]
    -----------------
    End error msg:]

    According to the TakeCommand.pdf help file this should be enough to trigger my aliases.
    What am I doing wrong?

    Larry
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Your filename contains spaces. You need to double-quote it, so the parser sees it as one word and not three ("c:\Documents", "and", and "Settings\larry\alias.lst"):

    Code:
    alias /r "c:\Documents and Settings\larry\alias.lst"
    
     
  7. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    My boo, boo. Thanks Charles.

    There is one final problem.

    I can set aliases from a 2 line file like:
    alias al=alias
    alias pf:=c:\Program Files\
    Note that according to TakeCommand.pdf it is not necessary to quote
    an alias definition.

    Here is a slightly longer version that won't set any aliases at all:
    :: lba: alist started by tcstart.btm startup alias and color file

    alias al=alias
    alias pf:=c:\program files

    :: Directory Targets
    :: -----------------
    alias ~;=c:\Documents and Settings\lba
    alias ho*me:=c:\documents and settings\lba
    alias ro*ot:=cd \
    alias myd:=c:\Documents and Settings\lba\My Documents
    alias dl:=c:\Documents and settings\lba\Downloads



    :: Common Commands
    :: ---------------
    alias des=descriibe
    alias v=vim :: vim editor
    alias x=exit

    :: Linux Commands
    :: --------------
    rem alias al=if[%# eq 0, *alias | *list /s,*alias %$]
    :: This is an old alias from NT and doesn't work in tcmd.
    alias pwd=cd
    alias grep=ffind /hkm /t

    :: DIR Aliases
    :: -----------
    :: /h is hide dots, /k is hide header, /m is hide footer eg: /hkm

    :: /1 (one column) /L (Lower Case)
    :: /2 )two column) /M (Hide Footer)
    :: /4 (four columns) /N (Normal LFN display)
    :: /: (show streams) /O (Order)
    :: /A (Attribute Slct) /P (Pause)
    :: /B (Bare) /P (show owner)
    :: /C[HP] (Compression) /B (Disable Wrap)
    :: /D (Disable Color) /S (Subdirectories to Depth n)
    :: /E (Use Upper Case) /T (show Attribute)
    :: /F (Full Path) /T: (time type)
    :: /G (Allocated Size) /U (show summary information)
    :: /H (Hide Dots) /V (Vertical sort)
    :: /I (Description) /W (Wide)
    :: /J (Justify Names) /X (Show short Names)
    :: /K (Hide Header) /Z (Use FAT format)

    alias ls=dir /w :: ls no details
    alias ll=dir :: ll all details

    exit

    :: Untested aliases below this line:

    alias ln=*cir /on :: ln sort by fn & ext (default)
    alias lt=*dir /od :: lt sorted by time
    alias lk=*dir /os :: lk sorted by size
    alias ld=*dir /wad :: ld shows directories only
    alias lg=*dir /og :: lg group directories, then files
    alias lf=*dir /o-g :: lg group files, then directories
    alias le=*dir /oe :: le sort by extension
    alias lu=*dir /ou :: lu is unsorted

    Would you please help me. I've worked for 2 days on this
    and can't understand what I'm doing wrong.

    Larry
     
  8. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    646
    Likes Received:
    1
    Are you loading this file using "alias /r"? If so, don't include the word "alias" at the start of each line.

    I think the semicolon should be a colon.
     
  9. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Directory aliases should have alphanumeric names. The tilde won't work, and there's no point in adding an asterisk in the middle:

    Code:
    alias home:=c:\documents and settings\lba\
    alias root:=c:\
    alias myd:=c:\documents and settings\lba\my documents\
    alias dl:=c:\documents and settings\lba\downloads\
    
    As David pointed out, if you're putting these in a text file to load via ALIAS /R, you shouldn't type an ALIAS command at the start of each line.
     
  10. larryalk

    Joined:
    Jul 18, 2009
    Messages:
    30
    Likes Received:
    0
    Thank you very much David and Charles.
    Problem is solved.

    Larry
     
  11. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Glad it's all working for you.
     
  12. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    560
    Likes Received:
    8
    Larry, you can switch from the annoying threaded message list to a much more friendly display by selecting the Linear Mode from the Display Modes pulldown at the upper right side of the thread.
     

Share This Page