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@fly.com.oz> wrote in message
news:%23UTEo6XTIHA.4476@TK2MSFTNGP06.phx.gbl...
> 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@a-znet.com> wrote in message
> news:%23yFvuvXTIHA.1164@TK2MSFTNGP02.phx.gbl...
>>I don't want it to actually run Tidy when I click the shortcut, but rather
>>to open a Command window with the text "Crogram 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@fly.com.oz> wrote in message
>> news:uuBginXTIHA.5208@TK2MSFTNGP04.phx.gbl...
>>>
>>> "Academia" <academiaNOSPAM@a-znet.com> wrote in message
>>> news:OCW8paXTIHA.5980@TK2MSFTNGP04.phx.gbl...
>>>>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
>>>>
>>>>>Crogram 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.
>>>
>>
>>
>
>