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

Alias in batch file

Discussion in 'Support' started by Darren Hayduk, Feb 24, 2017.

Tags:
  1. Darren Hayduk

    Joined:
    Feb 24, 2017
    Messages:
    2
    Likes Received:
    0
    TCC v16

    If a batch file has:

    echo 1
    svn status
    echo 2

    and I run the batch file, then I see "1", followed by the "svn status" output, followed by the "2".

    But if "svn" is an alias, then running the batch file results in "1", followed by the "svn status" output. And then
    a TCC prompt. I have to use "exit" and then I see "2" and my TCC prompt.

    Why is an alias in a batch file causing a second TCC shell to be started - and not exit? Is there a workaround?
     
  2. Darren Hayduk

    Joined:
    Feb 24, 2017
    Messages:
    2
    Likes Received:
    0
    Scratch that - the issue isn't TCC but svn (I recently switched from svn 1.5 to 1.7 and the behavior of "svn diff --diff-cmd" is different with 1.7; it seems the /c isn't being passed along to the diff program).

    Is there any way to for TCC to dump the args it was started with?
     
  3. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,190
    Likes Received:
    11
    TASKLIST /L will show you the running processes and their command lines.

    You can use the TCC name to filter the output: TASKLIST /L TCC

    Or use FIND or FFIND to locate a specific PID. E.g. TASKLIST /L TCC|find "%_PID*"
     
  4. rps

    rps

    Joined:
    Jul 6, 2008
    Messages:
    202
    Likes Received:
    3
    Try this out.
    Code:
    C:\JPSoft>test1.btm parm1 parm2 "parm 03" parm04
    
    the entire command line is: test1.btm parm1 parm2 "parm 03" parm04
    
    the command entered is: test1.btm
    
    The number of arguments is: 4
    
    Command tail/arguments is : parm1 parm2 "parm 03" parm04
    
    Shifting 1 argument eliminating original argument #1 -- parm1
    
    shift
    
    Command tail is now: parm2 "parm 03" parm04
    
    Original Unmodified Command tail/arguments is : parm1 parm2 "parm 03" parm04
    
    I'm not clear on what you want to do with the args, but test1.btm should give you some ideas.
    Here is a link to the Take Command / TCC help V20.10 online help for batch file parameters
    [title]
     

    Attached Files:

Share This Page