![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Windows & DOS: Issues & Discussions All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equivalent command to 'stat' | im_new | Shell Programming and Scripting | 6 | 01-15-2009 10:04 AM |
| I want a command in solaris equivalent to glance in HP-UX | grrajeish | SUN Solaris | 6 | 06-26-2008 09:17 AM |
| equivalent of ptree command in zsh | dhams | Shell Programming and Scripting | 3 | 09-11-2007 08:07 PM |
| Command equivalent to DOS mode for SCO 5.0.6 | jgt | UNIX for Advanced & Expert Users | 3 | 05-11-2007 08:10 AM |
| SQL Spool equivalent command in DOS | stevefox | Windows & DOS: Issues & Discussions | 2 | 01-17-2006 09:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello Milhan,
on top of what Pederabo has suggested.., the oter easy way to get working similar to aliases are using a set command.. C:\Documents and Settings\ilango\test>set dira=dir /A C:\Documents and Settings\ilango\test>dir Volume in drive C has no label. Volume Serial Number is 548F-C2AD Directory of C:\Documents and Settings\ilango\test 04/06/2009 12:13 PM <DIR> . 04/06/2009 12:13 PM <DIR> .. 04/06/2009 12:13 PM 4 normal.txt 1 File(s) 4 bytes 2 Dir(s) 6,269,435,904 bytes free C:\Documents and Settings\ilango\test>%dira% Volume in drive C has no label. Volume Serial Number is 548F-C2AD Directory of C:\Documents and Settings\ilango\test 04/06/2009 12:13 PM <DIR> . 04/06/2009 12:13 PM <DIR> .. 04/06/2009 12:13 PM 4 hidden.txt 04/06/2009 12:13 PM 4 normal.txt 2 File(s) 8 bytes 2 Dir(s) 6,269,403,136 bytes free C:\Documents and Settings\ilango\test> In teh above example, i made simiar to alias - dira to be executed as dir /A, only thing is you will have to use it with percentages.. as in %dira% /ilan |
|
||||
|
Quote:
Code:
C:> set dira="chdir /D $1" C:> %dira% "C:\Documents and Settings\All Users" The above command will not work. It would work if you only used the command with no argument capture but what would be the point? The whole idea of an alias is to be able to create a command with options and arguments without having to type the entire command every time you want to use it. In these examples we are using "dira." I count 4 characters. To use the "set" method you would be typing 6 characters to produce the same command if you were to use DosKey to produce the alias. Code:
C:> set dira=chdir /D C:> %dira% "C:\Documents and Settings\All Users" The "set" command, in my opinion, should only be used to store variables. |
|
||||
|
Carlos, your idea of using doskey is perfect. approach with set command is one of teh ways that we can achieve that..!!
on the chdir usage, i thought you are trying to switch drives often, i dien't realize that you switch to different directory paths.. overlook! /ilan |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|