home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
plawok22.zip
/
PWDISK1.ZIP
/
ff
/
cfg
/
ffrest.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-05-21
|
4KB
|
86 lines
@setlocal
@rem - tqpripth and tqsecpth are modified by coins when the
@rem - node is configured
@set tqpripth=C:\FF\DATADEF\FILES
@set tqsecpth=C:\FF\DATADEF\FILES
@if "%1" == "" @echo Insufficient command line arguments.
@if "%1" == "" @goto exit
@if "%2" == "" @echo Insufficient command line arguments.
@if "%2" == "" @goto exit
@if "%3" == "" @echo Insufficient command line arguments.
@if "%3" == "" @goto exit
@if "%4" == "" @echo Insufficient command line arguments.
@if "%4" == "" @goto exit
@if "%5" == "" @echo Insufficient command line arguments.
@if "%5" == "" @goto exit
@mkdir %tqpripth% 2> nul
@mkdir %tqsecpth% 2> nul
@set error=false
@echo Decompressing (if necessary) and transferring files...
@echo Network configuration files...
@if exist %5\cfg\pwnet.cfg @pcterse /l /r /d %5\cfg\pwnet.cfg %1\cfg
@if exist %5\cfg\net.cfg @pcterse /l /r /d %5\cfg\net.cfg %1\cfg
@if exist %5\cfg\pwio.cfg @pcterse /l /r /d %5\cfg\pwio.cfg %1\cfg
@if exist %5\cfg\network.cfg @pcterse /l /r /d %5\cfg\network.cfg %1\cfg
@if errorlevel 1 @goto err_exit
@echo Runtime configuration files...
@if exist %5\vision\files\vconfig @pcterse /l /r /d %5\vision\files\vconfig %1\vision\files
@if errorlevel 1 @goto err_exit
@if exist %5\vision\files\algbckup.tbl @pcterse /l /r /d %5\vision\files\algbckup.tbl %1\vision\files
@if errorlevel 1 @goto err_exit
@if exist %1\vision\files\dlt\cur\*.* @echo Y | erase %1\vision\files\dlt\cur\*.* 1> nul 2> nul
@set error=false
@if exist %5\vision\files\dlt\cur\*.* @pcterse /l /r /d %5\vision\files\dlt\cur\*.* %1\vision\files\dlt\cur
@if errorlevel 1 @goto err_exit
@echo PlantWorks Database Update Process files...
@pcterse /l /r /d %5\vision\data\*.* %1\vision\files\data
@if errorlevel 1 @goto err_exit
@if exist %5\im\primary\*.??0 @echo Report Generation tables...
@if exist %5\im\primary\*.??0 @pcterse /l /r /d %5\im\primary\*.??0 %2
@if errorlevel 1 @goto err_exit
@if exist %5\im\files\im*.* @goto do_imfiles
@goto join
:do_imfiles
@echo Item files...
@if exist %4\0*. @erase %4\0*.
@pcterse /l /r /d %5\im\files\imsv*.* %4
@if exist %5\im\files\imfiles.arc @goto newpct
@pcterse /l /r /d %5\im\files\*. %4
@if errorlevel 1 @goto err_exit
@goto join
:newpct
@pcterse /l /r /d /a %5\im\files\imfiles.arc %4
@if errorlevel 1 @goto err_exit
:join
@echo User created C functions...
@if exist %5\usrdll\*.dll @pcterse /l /r /d %5\usrdll\*.dll %1\usrdll
@if errorlevel 1 @goto err_exit
@echo User created bitmaps...
@if exist %5\bitmaps\*.* @pcterse /l /r /d %5\bitmaps\*.* %1\bitmaps
@if errorlevel 1 @goto err_exit
@echo CS2 tables/queues created through PlantWorks Data Definition...
@if exist %5\datadef\USERDEF.?DF @pcterse /l /r /d %5\datadef\USERDEF.?DF %1\DATADEF\FILES
@if errorlevel 1 @goto err_exit
@if exist %5\datadef\USERDEF.?DF @tqmaint -D%1\DATADEF\FILES -I
@if errorlevel 2 @goto C_S_2_E_R_R_O_R
@if errorlevel 1 @goto err_exit
@rem erase old tables/queues from the \ff\datadef\files directory - PN56915
@if exist %tqpripth%\*.*0 @erase %tqpripth%\*.*0
@if exist %tqsecpth%\*.*1 @erase %tqsecpth%\*.*1
@if exist %5\datadef\primary\*.??0 @pcterse /l /r /d %5\datadef\primary\*.* %tqpripth%
@if exist %5\datadef\shadow\*.??1 @pcterse /l /r /d %5\datadef\shadow\*.* %tqsecpth%
@if errorlevel 1 @goto err_exit
@echo ---------------------------------------
@echo Database restore completed successfully
@echo ---------------------------------------
@goto exit
:C_S_2_E_R_R_O_R
@echo Unable to communicate with Communications System/2.
@echo Can NOT restore tables/queues.
:err_exit
@echo The previous error prevented the restore operation from continuing.
@echo Correct the error condition and retry the operation.
:exit
@pause
@endlocal