Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Cmd.exe's doskey campatibility

Nov
17
0
I am switching over from cmd.exe to TCC LE.
I have some aliases files that I load using "doskey /macrofile=aliases.dat"
command.
typical entries in this aliases file use $t (The command seperator of cmd.exe)
and $* (All parameters supplied in the command line) extensively.

When I use this aliases file using "alias /r" command, later when I invoke aliases having $t or $* in it, TCCLE complains.
Is there a way to make a single aliases to be used by doskey as well as TCC LE? This is needed because I need to work on others machines(no TCCLE), with my aliases(take it on a stick).
Examples from my alias file:

os=dir /os $*
od=dir /od $*
mc=md $* $t cd $*
</pre>

for example, when I type mc t1, it tries to create directories called $*, $t, cd, $* and t1.
 
I am switching over from cmd.exe to TCC LE.
I have some aliases files that I load using "doskey /macrofile=aliases.dat"
command.
typical entries in this aliases file use $t (The command seperator of cmd.exe)
and $* (All parameters supplied in the command line) extensively.

When I use this aliases file using "alias /r" command, later when I invoke aliases having $t or $* in it, TCCLE complains.
Is there a way to make a single aliases to be used by doskey as well as TCC LE? This is needed because I need to work on others machines(no TCCLE), with my aliases(take it on a stick).

DOSKEY's macro facility is different from TCC aliases in more ways than just special character handling; I don't think you'll be able to use the same file with both. Instead, you might carry two files, one with DOSKEY macros and another with TCC aliases. Use your text editor's search-and-replace function to translate $T to & or %+, and $* to %$.

Alternately, I would expect TCC/LE to run from a USB stick, though I haven't actually tried it.
 
JP Software Forums" <[email protected]>; "holla wrote:
| I am switching over from cmd.exe to TCC LE.
...
| When I use this aliases file using "alias /r" command, later when I
| invoke aliases having $t or $* in it, TCCLE complains.
| Is there a way to make a single aliases to be used by doskey as well
| as TCC LE? This is needed because I need to work on others
| machines(no TCCLE), with my aliases(take it on a stick).

You can take TCCLE with you on the stick, but there is no "common syntax"
for TCCLE and DOSKEY (the latter of which is not an integral part of CMD,
just another MS tool). The symbolic form of the command separator in TCCLE
is %+ (percent sign followed by plus sign). If you use the default special
character in TCCLE, $* should work to specify "the whole command tail".
--
HTH, Steve
 
Since TCC/LE is a free product there is no reason why you couldn't take it
along on a USB key. If you are already bringing your key with your
aliases file with you, you might as well bring TCC/LE along too.

If $t and $* are the only changes required between the two environments,
you could easily "translate" the doskey alias file to one TCC could use.
In your TCSTART file, instead of ALIAS /R do this instead:

setdos /x-456
do al in @aliases.dat
set al=%@replace[$T,&,%al]
set al=%@replace[$*,%%$,%al]
do p = 1 to 9
set al=%@replace[$%p,%%%p,%al]
enddo
alias %al
enddo
setdos /x0

-Scott

"JP Software Forums" <[email protected]> wrote on 11/14/2008 02:41:57 AM:


> I am switching over from cmd.exe to TCC LE.
> I have some aliases files that I load using "doskey
/macrofile=aliases.dat"

> command.
> typical entries in this aliases file use $t (The command seperator of
cmd.exe)

> and $* (All parameters supplied in the command line) extensively.
>
> When I use this aliases file using "alias /r" command, later when I
> invoke aliases having $t or $* in it, TCCLE complains.
> Is there a way to make a single aliases to be used by doskey as well
> as TCC LE? This is needed because I need to work on others
> machines(no TCCLE), with my aliases(take it on a stick).
> Examples from my alias file:
>
> os=dir /os $*
> od=dir /od $*
> mc=md $* $t cd $*
> </pre>
>
> for example, when I type mc t1, it tries to create directories
> called $*, $t, cd, $* and t1.
>
>
>
>
 

Similar threads

Back
Top