@ECHO OFF REM - This version of AUTOPARM.BAT avoids a conflict REM with SHARE that afflicted the original. IF (%1)==() GOTO Action IF NOT EXIST %0 GOTO TryBat TYPE %0 | FIND "SET %1=" /V /I > %0 IF NOT (%2)==() ECHO SET %1=%2>> %0 GOTO Action :TryBat IF EXIST %0.BAT GOTO AddBat ECHO Either execute %0 from the current directory ECHO or spell out its full pathname. GOTO Action :AddBat TYPE %0.BAT | FIND "SET %1=" /V /I > %0.BAT IF NOT (%2)==() ECHO SET %1=%2>> %0.BAT :Action