home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 29 Fixes_o
/
29-Fixes_o.zip
/
wr07060a.zip
/
US7060B2.DSK
/
LCU
/
LCU.ZIP
/
GETREXX.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-04-28
|
2KB
|
54 lines
@ECHO OFF
REM GETREXX 2.02
SETLOCAL
IF %1.==. ECHO GETREXX source (target)
IF %1.==. GOTO END
REM
REM CHECK SOURCE DIRECTORY
REM
IF EXIST %1\DISK_2\*.* GOTO GETTAR
COPY %1\DISK_2\*.*
GOTO END
:GETTAR
SET PATH=%1;%PATH%
REM
REM GET TARGET DIRECTORY
REM
SET GR_TARGET=
IF %2.==. SET GR_TARGET=.
IF NOT %2.==. SET GR_TARGET=%2
IF %GR_TARGET%.==.. GOTO CHKUNPACK
SET GR_MKDIR=
DIR %GR_TARGET%\*.* >> NUL 2>>&1
IF ERRORLEVEL 1 SET GR_MKDIR=YES
IF %GR_MKDIR%.==YES. ECHO MD %GR_TARGET%
IF %GR_MKDIR%.==YES. MD %GR_TARGET%
IF ERRORLEVEL 1 GOTO END
:CHKUNPACK
REM
REM CHECK FOR UNPACK.EXE IN THE DISK_2 DIRECTORY
REM
IF EXIST %1\DISK_2\*.* GOTO UNPACK
COPY %1\DISK_2\UNPACK.EXE
GOTO END
:UNPACK
ECHO %1\DISK_2\UNPACK %1\DISK_*\REXX %GR_TARGET%
FOR %%I IN (3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25) DO IF EXIST %1\DISK_%%I\REXX %1\DISK_2\UNPACK %1\DISK_%%I\REXX %GR_TARGET% >> NUL 2>>&1
ECHO %1\DISK_2\UNPACK %1\DISK_*\BUNDLE %GR_TARGET% /N:OSO001.MSG
FOR %%I IN (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25) DO IF EXIST %1\DISK_%%I\BUNDLE %1\DISK_2\UNPACK %1\DISK_%%I\BUNDLE %GR_TARGET% /N:OSO001.MSG >> NUL 2>>&1
ECHO %1\DISK_2\UNPACK %1\DISK_*\BUNDLE %GR_TARGET% /N:INSCFG32.DLL
FOR %%I IN (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25) DO IF EXIST %1\DISK_%%I\BUNDLE %1\DISK_2\UNPACK %1\DISK_%%I\BUNDLE %GR_TARGET% /N:INSCFG32.DLL >> NUL 2>>&1
ECHO %1\DISK_2\UNPACK %1\DISK_*\BUNDLE %GR_TARGET% /N:SHPIINST.DLL
FOR %%I IN (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25) DO IF EXIST %1\DISK_%%I\BUNDLE %1\DISK_2\UNPACK %1\DISK_%%I\BUNDLE %GR_TARGET% /N:SHPIINST.DLL >> NUL 2>>&1
ECHO COPY %1\DISK_*\UHPFS.DLL %GR_TARGET%
FOR %%I IN (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25) DO IF EXIST %1\DISK_%%I\UHPFS.DLL COPY %1\DISK_%%I\UHPFS.DLL %GR_TARGET% >> NUL 2>>&1
REM
REM ENSURE THAT THE FILES WERE UNPACKED
REM
IF NOT EXIST %GR_TARGET%\*REX*.* COPY %GR_TARGET%\*REX*.*
IF NOT EXIST %GR_TARGET%\OSO001.MSG COPY %GR_TARGET%\OSO001.MSG
:END
ENDLOCAL