Re: Nead a script to run a DOS program



Great
Not exactly what I wanted.
I changed the first set to:
set /p Target=enter the path to the files:
Didn't really know what I was doing but duplicated your second set and it
worked.
Tried to find documentation on "set" by searching Help for it but didn't
find it.
Are these commands documented someplace?
For example, don't know what "/p" does.

I was playing with a shortcut file with the target cmd or command, and the
folder the location of tidy. Like you approach much better.

What is the difference between command and cmd?


It appears that you took the time to write the code just to answer my query.
I really appreciate it
thanks





"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:%23UTEo6XTIHA.4476@xxxxxxxxxxxxxxxxxxxxxxx
You could do this with a macro that generates key strokes
but a more robust way would be to invoke the batch file
below via a desktop shortcut:

@echo off
set Target=c:\Program Files

:Again
set /p name=Please enter a file name for the Tidy program:
if "%name%"=="" goto Exit
if exist "%Target%\%name%" goto Action
echo Cannot locate "%Target%\%name%".
echo.
goto again

:Action
cd /d "%Target%"
"%Target%\Tidy.exe" "%Target%\%name%"

:Exit
echo.
echo Press the Space Bar to close this window.
pause > nul


"Academia" <academiaNOSPAM@xxxxxxxxxx> wrote in message
news:%23yFvuvXTIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
I don't want it to actually run Tidy when I click the shortcut, but rather
to open a Command window with the text "C:Program Files\Tidy.exe" in it so
I can add the filename that Tidy will work on, and then press Enter to run
Tidy.

thanks



"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:uuBginXTIHA.5208@xxxxxxxxxxxxxxxxxxxxxxx

"Academia" <academiaNOSPAM@xxxxxxxxxx> wrote in message
news:OCW8paXTIHA.5980@xxxxxxxxxxxxxxxxxxxxxxx
I have a DOS program, Tiny.exe

I'd like to add a shortcut to the Start menu that opens a Command
prompt window containing text pointing to that program.

That is, when I click the shortcut I'd like a Command window to open
showing

C:Program Files\Tidy.exe

so I can then type the options and filename and then run Tidy

Can you give me a reference to a script that I can put in a file and so
a shortcut to it accomplishes the above?


Thanks for any help


Create a shortcut on your desktop to Tidy.exe, then specify
"c:\Program Files" as the "Start in" folder.







.



Relevant Pages

  • Re: Nead a script to run a DOS program
    ... echo Cannot locate "%Target%\%name%". ... I can add the filename that Tidy will work on, and then press Enter to run ... I'd like to add a shortcut to the Start menu that opens a Command prompt ... when I click the shortcut I'd like a Command window to open ...
    (microsoft.public.windowsxp.general)
  • Re: Command Line Switch Question
    ... > command line switch. ... Does anyone know the switch to use? ... (It's possible that there is not a space between "echo" and "off". ... Create a shortcut to run the batchfile, and make sure the shortcut is set to ...
    (microsoft.public.windowsxp.general)
  • Re: Nead a script to run a DOS program
    ... You can find help for just about all Command Prompt commands ... I was playing with a shortcut file with the target cmd or command, ... echo Cannot locate "%Target%\%name%". ... I'd like to add a shortcut to the Start menu that opens a Command ...
    (microsoft.public.windowsxp.general)
  • Re: Nead a script to run a DOS program
    ... But tried "help" in the Command Processor and that gave all the names. ... below via a desktop shortcut: ... echo Cannot locate "%Target%\%name%". ...
    (microsoft.public.windowsxp.general)
  • Re: Persisting env vars in cmd windows
    ... more about batch files as you go on, ... echo The time is %time::=.% ... But the piece de resistance was the "start" command, ... echo:: ERROR ERROR ERROR ERROR ...
    (microsoft.public.win2000.general)

Quantcast