home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
bbs_door
/
acf540r0.arj
/
SCANZIP.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-01-17
|
4KB
|
175 lines
@echo off
REM ----------------------------------------------------------------------
REM ACFExtended Batch for ACFiles
REM
REM Arguments: %1 - Path to File,
REM Arguments: %2 - Filename,
REM Arguments: %3 - Filename Without .EXT
REM Arguments: %4 - Extension of Filename (No ., just EXT)
REM
REM This one does just about everything you want 8-)
REM It converts to ZIP, scans for viri, etc.
REM ----------------------------------------------------------------------
:
:Make file have today's date
:
newdate %1%2
:
REM ----------------------------------------------------------------------
:
:Check For ARC/LZH/PAK/ZOO/ZIP Files
:IF One of those, goto ZIP for Conversion
:
:Set Default Return Message
:
if %4 == ZIP acf_ret MSG No Conversion Needed/No Viri - Thanks!
:
:
if %4 == ARJ goto zip
if %4 == ARC goto zip
if %4 == LZH goto zip
if %4 == PAK goto zip
if %4 == ZOO goto zip
if %4 == ZIP goto zip
:
REM ----------------------------------------------------------------------
:
: If no conversion needed, end
:
: Tell them thanks for using the normal format..
:
acf_ret MSG No conversion required - Thanks!
:
:
: Was not a recognizable archive format - going to end
: If you want you may scan .EXE's as well for viri at this stage.
: Simply run SCAN on the file and check the errorlevel. If all
: goes well, go to end. Otherwise GOTO VIRUS
:
:
scan %2 /NOMEM
:
if errorlevel 1 goto virus
:
:
:
goto end
:
REM ----------------------------------------------------------------------
:
REM ZIP - This Converts to .ZIP, Scans via. McAffee's Scan
:
:zip
md 1111
cd 1111
if %4 == ARJ arj e %1%3
if %4 == LZH lha e %1%3
if %4 == PAK pak e %1%3
if %4 == ZOO zoo e %1%3
if %4 == ARC pkxarc %1%3
if %4 == ZIP pkunzip %1%3
:
REM ----------------------------------------------------------------------
:
: You do NOT need to do PKUNZIP unless you want to scan for viri
: on the file.
:
: This stage will scan for viri for all files in the package.
: SCAN returns back ErrorLevel 1 if virus found.
:
:
scan *.* /NOMEM
:
: If Bad, Go To Parent Diretory and call The Virus Found Routine
:
if errorlevel 1 cd ..
if errorlevel 1 goto virus
:
REM ----------------------------------------------------------------------
:
: At this point we know it doesn't contain a known virus.
:
: If not ZIP file, then convert to .ZIP
:
if not %4 == ZIP pkzip %1%3 *.*
:
: Here we can put on a BBS advertisement
: The BBS advertisement in this case is E:\ACFILES\BBSAD
: We use Redirection here.
:
:pkzip -z %1%3 <e:\acfiles\bbsad
:
:
: Return to parent directory where we started - where RETURN.ACF
: resides.
:
cd ..
:
:
: Clean directory 1111
:
:
cleandir 1111
:
:
: Delete file if it was converted (not .ZIP already)
:
if not %4 == ZIP del %1%2
:
:
: This returns back the new filename as well as a sweet little ol' msg.
:
:
acf_ret NAME %3.ZIP
if not %4 == ZIP acf_ret MSG File Converted To .ZIP - Thanks for Waiting!
:
:Now we go to the end of the batch file.
:
goto end
:
REM ----------------------------------------------------------------------
:
:virus
:
:
: Now we can run ACF_RET To Return Various Information
:
: The following tells ACFiles not to add the filename to the
: files.bbs (DELETE)
:
: Then it returns a message that a virus was found.
:
: Next it gives them no credit for the upload.
: It also gives back 0 time credit ratio (valid for First U/L Only)
:
acf_ret DELETE
acf_ret MSG Virus Found - Deleted!
acf_ret NOCREDIT
acf_ret TIME 0
:
:
: Now let's delete the file..Optionally you could perhaps move
: the file elsewhere for you to look over.
:
del %1%2
:
: Note ACFiles does not delete the file - it is up to the batch
: file to do that operation. DELETE only states not to put the
: entry into the FILES.BBS
:
:
: Now let's clean up the temp. directory made.
:
cleandir 1111
:
: And finally we end the batch file
:
goto end
:
REM ----------------------------------------------------------------------
:
:end
:
REM ----------------------------------------------------------------------