From: FrankV on
I used help /? to find doskey.

Frank

"Twayne" <nobody(a)spamcop.net> wrote in message
news:egSYmfjwKHA.1796(a)TK2MSFTNGP02.phx.gbl...
> In news:%23rPGVShwKHA.4532(a)TK2MSFTNGP05.phx.gbl,
> FrankV <vze32975(a)verizon.net> typed:
>> In dos type doskey /? and you might find something in
>> there, although I doubt it. There is not much you can do
>> anymore as we used to do in ms-dos.
>
> Whaat, there is a lot you can still do; just not the disk operations like
> sys, fdisk, things that that which arean't compatible. Jst type Help at
> the command prompt for a complete list. And that's only a small bit of
> what you can do from the command prompt; it's a lot longer list than the
> Help listing.
>
> HTH,
>
> Twayne`
>
>> Frank
>>
>> "InvisibleDuncan"
>> <InvisibleDuncan(a)discussions.microsoft.com> wrote in
>> message
>> news:FD70D848-8E85-45A9-BB4A-F76F121A5EFA(a)microsoft.com...
>>> Can anyone remember the syntax for getting a Windows
>>> shortcut or a command prompt to prompt the user for a
>>> parameter? It's something I haven't done for
>>> years - possibly decades...
>>>
>>> In fact, it's been so long that I've been told it's been
>>> removed from Windows and that I'll have to use a batch
>>> file instead. That seems absurd -
>>> surely it's not the case?
>
>
>
> --
> --
> Life is the only real counselor; wisdom unfiltered
> through personal experience does not become a
> part of the moral tissue.


From: Twayne on
Doskey is a handy utility but I don't think it's what's needed for this
case.
Doskey.exe is always available for all character-based, interactive programs
(such as program debuggers or file transfer programs), and maintains a
command history buffer and macros for each program that it starts. You
cannot use doskey command-line options from a program. You must run doskey
command-line options before you start a program. Program key assignments
override doskey key assignments.
..Recalling a command
To recall a command, you can use any of the following keys after starting
Doskey.exe. If you use Doskey.exe within a program, that program's key
assignments take precedence.
KeyDescription
UP ARROW Recalls the command you used before the one displayed.
DOWN ARROWRecalls the command you used after the one displayed.
PAGE UPRecalls the oldest command you used in the current session.
PAGE DOWNRecalls the most recent command you used.

..Editing the command line
With Doskey.exe, you can edit the current command line. If you use
Doskey.exe within a program, that program's key assignments take precedence
and some Doskey.exe editing keys might not work.
The following table lists doskey editing keys and their functions.
Key or key combinationDescription
LEFT ARROWMoves the insertion point back one character.
RIGHT ARROWMoves the insertion point forward one character.
CTRL+LEFT ARROWMoves the insertion point back one word.
CTRL+RIGHT ARROWMoves the insertion point forward one word.
HOMEMoves the insertion point to the beginning of the line.
ENDMoves the insertion point to the end of the line.
ESCClears the command from the display.
F1Copies one character from the same column in the template to the same
column in the Command Prompt window. (The template is a memory buffer that
holds the last command you typed.)
F2Searches forward in the template for the next key you type after pressing
F2. Doskey.exe inserts the text from the template up to, but not including,
the character you specify.
F3Copies the remainder of the template to the command line. Doskey.exe
begins copying characters from the position in the template that corresponds
to the position indicated by the insertion point on the command line.
F4Deletes characters from the current insertion point position up to a
character you specify. To use this editing key, press F4 and type a
character. Doskey.exe deletes the characters from the current insertion
point position to the first letter specified.
F5Copies the template into the current command line.
F6Places an end-of-file character (that is, CTRL+Z) at the current insertion
point position.
F7Displays all commands for this program stored in memory in a pop-up box.
Use the UP ARROW key and the DOWN ARROW key to select the command you want,
and press ENTER to run the command. You can also note the sequential number
in front of the command and use this number in conjunction with the F9 key.
ALT+F7Deletes all commands stored in memory for the current history buffer.
F8Displays all commands in the history buffer that start with the characters
in the current command.
F9Prompts you for a history buffer command number, then displays the command
associated with the number you specify. Press ENTER to run the command. To
display all the numbers and their associated commands, press F7.
ALT+F10Deletes all macro definitions.

..Using doskey within a program
Certain character-based, interactive programs, such as program debuggers or
file transfer programs (FTP), automatically use Doskey.exe. To use
Doskey.exe, a program must be a console process and use buffered input.
Program key assignments override doskey key assignments. For example, if the
program uses the F7 key for some function, you cannot get a doskey command
history in a pop-up window.
With Doskey.exe you can maintain a command history for each program you
start, repeat and edit previous commands at the program's prompt, and start
doskey macros created for the program. If you exit and then restart a
program from the same Command Prompt window, the command history from the
previous program session is available.
You must run Doskey.exe before you start a program. You cannot use doskey
command-line options from a program's command prompt, even if the program
has a shell command.
If you want to customize how Doskey.exe works with a program and create
doskey macros for that program, you can create a batch program that modifies
Doskey.exe and starts the program.
..Specifying a default insert mode
If you press the INSERT key, you can type text on the doskey command line in
the middle of old text without replacing the old text. However, after you
press ENTER, Doskey.exe returns your keyboard to replace mode. You must
press INSERT again to return to insert mode.
Use /insert to switch your keyboard to insert mode each time you press
ENTER. Your keyboard effectively remains in insert mode until you use
/overstrike. You can temporarily return to replace mode by pressing the
INSERT key, but after you press ENTER, Doskey.exe returns your keyboard to
insert mode.
The insertion point changes shape when you use the INSERT key to change from
one mode to the other.
..Creating a macro
You can use Doskey.exe to create macros that carry out one or more commands.
The following table lists special characters you can use to control command
operations when you define a macro.
CharacterDescription
$G or $gRedirects output. Use either of these special characters to send
output to a device or a file instead of to the screen. This character is
equivalent to the redirection symbol for output (>).
$G$G or $g$gAppends output to the end of a file. Use either of these special
double characters to append output to an existing file instead of replacing
the data in the file. These double characters are equivalent to the append
redirection symbol for output (>>).
$L or $lRedirects input. Use either of these special characters to read
input from a device or a file instead of from the keyboard. This character
is equivalent to the redirection symbol for input (<).
$B or $bSends macro output to a command. These special characters are
equivalent to using the pipe (|) on a command line.
$T or $t Separates commands. Use either of these special characters to
separate commands when you create macros or type commands on the doskey
command line. These special characters are equivalent to using the ampersand
(&) on a command line.
$$Specifies the dollar-sign character ($).
$1 through $9Represent any command-line information you want to specify when
you run the macro. The special characters $1 through $9 are batch
parameters, which make it possible for you to use different data on the
command line each time you run the macro. The $1 character in a doskey
command is similar to the %1 character in a batch program.
$*Represents all the command-line information you want to specify when you
type the macro name. The special character $* is a replaceable parameter
that is similar to the batch parameters $1 through $9, with one important
difference: everything you type on the command line after the macro name is
substituted for the $* in the macro.

..Running a doskey macro
To run a macro, type the macro name starting at the first position on the
command line. If the macro was defined with $* or any of the batch
parameters $1 through $9, use a white space to separate parameters. You
cannot run a doskey macro from a batch program.
..Creating a macro with the same name as a Windows XP command
If you always use a particular command with specific command-line options,
you can create a macro that has the same name as the command. To specify
whether you want to run the macro or the command, follow these guidelines:
..To run the macro, begin typing the macro name immediately after the command
prompt, with no space between the prompt and the command name.
..To run the command, insert one or more white spaces between the command
prompt and the command name.

..Deleting a macro
To delete a macro, type:
doskey macroname=

Top of page
Examples
The /macros and /history command-line options are useful for creating batch
programs to save macros and commands. For example, to store all current
doskey macros, type:
doskey /macros > macinit
To use the macros stored in Macinit, type:
doskey /macrofile=macinit
To create a batch program named Tmp.bat that contains recently used
commands, type:
doskey /history > tmp.bat
To define a macro with multiple commands, use $t to separate commands, as
follows:
doskey tx=cd temp$tdir/w $*
In the preceding example, the TX macro changes the current directory to Temp
and then displays a directory listing in wide display format. You can use $*
at the end of the macro to append other command-line options to dir when you
run TX.
The following macro uses a batch parameter for a new directory name:
doskey mc=md $1$tcd $1
The macro creates a new directory and then changes to it from the current
directory.
To use the preceding macro to create and change to a directory named Books,
type:
mc books
To create a doskey macro for a program called Ftp.exe, include /exename as
follows:
doskey /exename:ftp.exe go=open 10.127.1.100$tmget *.TXT c:\reports$bye
To use the preceding macro, start ftp. At the ftp prompt, type:
go
Ftp runs the open, mget, and bye commands.
To create a macro that performs a quick and unconditional format of a disk,
type:
doskey qf=format $1 /q /u
To format a disk in drive A quickly and unconditionally, type:
qf a:

HTH,

Twayne`
n news:eteNLKkwKHA.1984(a)TK2MSFTNGP05.phx.gbl,
FrankV <vze32975(a)verizon.net> typed:
> I used help /? to find doskey.
>
> Frank
>
> "Twayne" <nobody(a)spamcop.net> wrote in message
> news:egSYmfjwKHA.1796(a)TK2MSFTNGP02.phx.gbl...
>> In news:%23rPGVShwKHA.4532(a)TK2MSFTNGP05.phx.gbl,
>> FrankV <vze32975(a)verizon.net> typed:
>>> In dos type doskey /? and you might find something in
>>> there, although I doubt it. There is not much you can do
>>> anymore as we used to do in ms-dos.
>>
>> Whaat, there is a lot you can still do; just not the disk
>> operations like sys, fdisk, things that that which arean't
>> compatible. Jst type Help at the command prompt for a
>> complete list. And that's only a small bit of what you
>> can do from the command prompt; it's a lot longer list
>> than the Help listing. HTH,
>>
>> Twayne`
>>
>>> Frank
>>>
>>> "InvisibleDuncan"
>>> <InvisibleDuncan(a)discussions.microsoft.com> wrote in
>>> message
>>> news:FD70D848-8E85-45A9-BB4A-F76F121A5EFA(a)microsoft.com...
>>>> Can anyone remember the syntax for getting a Windows
>>>> shortcut or a command prompt to prompt the user for a
>>>> parameter? It's something I haven't done for
>>>> years - possibly decades...
>>>>
>>>> In fact, it's been so long that I've been told it's been
>>>> removed from Windows and that I'll have to use a batch
>>>> file instead. That seems absurd -
>>>> surely it's not the case?
>>
>>
>>
>> --
>> --
>> Life is the only real counselor; wisdom unfiltered
>> through personal experience does not become a
>> part of the moral tissue.



--
--
Life is the only real counselor; wisdom unfiltered
through personal experience does not become a
part of the moral tissue.

First  |  Prev  | 
Pages: 1 2
Prev: Control of ATI events
Next: Printer and XP