Tuesday, November 13, 2012

DOS Alias

http://www.ibm.com/developerworks/forums/thread.jspa?threadID=112117


Here's an extract (with screen shots ommitted) from an email I sent to my co-worker after I setup a use of a doskey file.

I created a "doskey" file that defines aliases "ct" and "mt", for command-line use in "cmd" windows.
The file is on a Samba share available to all users at:
\\cmsrv\SJVBSCMSRV\POLICY\Tools\dk.bat

For starters, the only line in the file are:
doskey ct=cleartool $*
doskey mt=multitool $*
doskey credmap="C:\Program Files\Rational\ClearCase\etc\utils\credmap.exe" $*
doskey creds="C:\Program Files\Rational\ClearCase\etc\utils\creds.exe" $*
However, we can add to it as we please.

To use the file, open the "Properties" of your shortcut to "cmd".
On the "Properties" window, select the "Shortcut" tab. The default "Target" is:

%SystemRoot%\system32\cmd.exe

Append the following to it:

/q /k \\cmsrv\SJVBSCMSRV\POLICY\Tools\dk.bat

to give:

%SystemRoot%\system32\cmd.exe /q /k \\cmsrv\SJVBSCMSRV\POLICY\Tools\dk.bat

Then select "OK" or "Apply".

Regards,
Dan R.

No comments:

Post a Comment