I have an old 386 computer (without windows) which has MSDOS 6.22. So I cannot use any solution that built on cmd.exe (part of windows)
I want to pass current bat script path and name to another program within this bat code.
I try to use %CD%
but it looks like works only with cmd.exe
I try to use %0
argument, but it hold only the name of bat instead of name with full path
@echo off
set myPath=%cd%
myprogram.exe %myPath%\%0
It doesn't work. The passed parameter is \mybat.bat
when I started the bat program from it's directory with full name.
After the variables resolved, I want to something like this:
@echo off
myprogram C:\BATCH\MYBAT.BAT
Where the bat placed in c:\batch
directory, and it name is mybat.bat
How can I do this?