(E-Mail Removed)lid wrote:
> Sid Elbow <(E-Mail Removed)> wrote in
>>>> I'm trying to run the following batch file:
>>>>
>>>>
>>>> @echo off
>>>>
>>>> rem ***Set cbreak parms here, after the equals sign ***
>>>> set cbreakparms=-b60 -d20 -s60
>>>>
>>>> :again
>>>> if "%1"=="" goto end
>>>> mkdir "%~dp1cbreak"
>>>> cbreak "%1" "%~dp1cbreak\%~nx1" %cbreakparms%
>>>> shift
>>>> goto again
>>>> :end
>>>>
>>>> It fails with the message:
>>>>
>>>> " 'cbreak' is not recognized as an internal or external
>>>> command, operable program or batch file"
>>>>
>>>> .... yet the program cbreak.exe does exist and is in the
>>>> same directory as the batch file.
> Suggestion: add justt before "cbreak" a la
> cd
> pause
Tried that - it didn't help
> You need full path to the .exe because the path is relative to
> current dir, not to whatever is passed to the .bat
>
> I think (it's been a while) that a .bat may run with Documents
> and Settings as its current dir when you invoke it via
> drag&drop or Sent To. I have notes about that somewhere ... if
> you wish, I'll try harder to remember where.
I think you hit the nail on the head with this. When I tried your first
suggestion, I notice that command prompt during batch file operation
shows the current directory as ...\documents and Settings\<user>. So it
seems that if, in the GUI, I open a window to, say, E:/mydir containing
a .bat file, then drag-and-drop some files onto the .bat, windows runs
said batch file from the user-directory. That strikes me as less than
useful.
In any event, it seems I can get around it by putting the cbreak.exe
program on the command-path.