Prev: Control of ATI events
Next: Printer and XP
From: InvisibleDuncan on 12 Mar 2010 10:49 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?
From: FrankV on 12 Mar 2010 13:48 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. 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?
From: Twayne on 12 Mar 2010 17:58 In news:FD70D848-8E85-45A9-BB4A-F76F121A5EFA(a)microsoft.com, InvisibleDuncan <InvisibleDuncan(a)discussions.microsoft.com> typed: > 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? I think you mean %? %1, %2 and so forth to %9 and then you can shift for more. Batch: xcopy %1 c:\filename Save as Mycopy.batch. --------------- Although you can use the % symbol to specify a variable in a batch file, you must type in two % symbols in succession. For example, you must type for /L %%n IN (1,1,10) DO @ECHO %%nto tell the batch file to interpret the command as for /L %n IN (1 1 10) DO @ECHO %nIf you simply want to output the % symbol from a batch file, you must also type in two % symbols in succession. For example, type echo 10%%to display 10%The standard % symbols that surround an environment variable remain the same, regardless of whether you're typing them at a command prompt or including them in a batch file. For example, type echo %date%to display the date. ------------------------------ http://commandwindows.com/tipsandtricks.htm HTH, Twayne` -- Life is the only real counselor; wisdom unfiltered through personal experience does not become a part of the moral tissue.
From: Twayne on 12 Mar 2010 18:00 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 12 Mar 2010 18:04
In news:OteKFejwKHA.6140(a)TK2MSFTNGP05.phx.gbl, Twayne <nobody(a)spamcop.net> typed: > In news:FD70D848-8E85-45A9-BB4A-F76F121A5EFA(a)microsoft.com, > InvisibleDuncan <InvisibleDuncan(a)discussions.microsoft.com> > typed: >> 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? > > I think you mean %? %1, %2 and so forth to %9 and then you > can shift for more. > > Batch: > xcopy %1 c:\filename > Save as Mycopy.batch. > > > --------------- > Although you can use the % symbol to specify a variable in > a batch file, you must type in two % symbols in succession. > For example, you must type for /L %%n IN (1,1,10) DO @ECHO %%nto tell the > batch file > to interpret the command as > for /L %n IN (1 1 10) DO @ECHO %nIf you simply want to > output the % symbol from a batch file, you must also type > in two % symbols in succession. For example, type > > echo 10%%to display > 10%The standard % symbols that surround an environment > variable remain the same, regardless of whether you're > typing them at a command prompt or including them in a > batch file. For example, type > echo %date%to display the date. > ------------------------------ > > http://commandwindows.com/tipsandtricks.htm > > HTH, > > Twayne` Also, the best DOS experts I've found around live at alt.msdos.batch.nt if you have access to the .alt groups. If XP can do it, they'll know how. HTH, Twayne` - -- Life is the only real counselor; wisdom unfiltered through personal experience does not become a part of the moral tissue. |