home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
gw
/
res.exe
/
RES.BAT
next >
Wrap
DOS Batch File
|
1995-10-30
|
3KB
|
88 lines
The following page shows the OAMARCHI and OAMRESTO Applications
Command lines and Batch files needed to run Archive and Restore.
Here are a couple of things to remember:
1. Remember to change the Object Access Modules (accessed through
Setup|Control|Object) so that Archiving and Restoring are
reading the new OAMs. This step is only needed if new OAMs
are created rather then editing the current OAMs.
2. Restore.bat will need to be located on a network so that
everyone will have the ability to restore a document. Also,
make sure that the OAM Restoration application is changed to
read the batch file on the network.
3. In the Archive/Restore batch file examples the archive
directory is C:\Archive. Change the batch files to copy
documents to the proper Archive directory structure.
4. Please note that these batch files are intended as examples
only. These may be modified to suit your own purposes, such as
allowing for dynamic mapping/attaching to the archive location
(i.e. using the NetWare map, map del, & logout commands).
Here are the command line parameters:
OAMARCHI command line: c:\archive.bat %p %f %q %r[ ]
OAMRESTO command line: c:\restore.bat %p %f %q %r[ ] %j
Archive.bat
@echo off
rem ***Check for the existance of the source file.
rem ***Return an error if it doesn't exist.
if exist %1%2 goto start
echo ERRORError: File not found. File not archived > %4
goto end
rem ***Create the archive set directory if necessary,
rem ***then archive the file and delete the copy.
rem ***Return an error if unsuccessful.
:start
if not exist c:\archive\%3\*.* md c:\archive\%3
copy %1%2 c:\archive\%3\%2 > nul
if exist c:\archive\%3\%2 goto finish
echo ERRORError moving file. File not archived > %4
goto end
:finish
del %1%2
:end
Restore.bat
@echo off
rem ***Check Job Type to see if On-Line Check or Restore Operation
rem *** Job Type 40 = Restore Job Type 41 = On-Line Check
if %5==40 goto restore
rem ***On-Line Check Operation
:online
rem ***Check to see if the file exists in the archive area.
rem ***If not, return an error.
if exist c:\archive\%3\%2 goto end
echo ERRORError: The file is not on-line > %4
goto end
rem ***Restore Operation.
:restore
rem ***Restore the file and delete the copy in the archive area.
rem ***Return an error if unable to move the file.
copy c:\archive\%3\%2 %1%2 > nul
if exist %1%2 goto continue
echo ERRORError moving file. File not restored > %4
goto end
:continue
del c:\archive\%3\%2
:end