home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
UTILITY
/
UPLD-BAT.ARJ
/
UPLOAD.BAT
Wrap
DOS Batch File
|
1991-12-08
|
4KB
|
133 lines
My upload.bat event
Darrell Mobley #1 @9402
Mon Nov 25 01:08:49 1991
5Several of the users here have requested an upload event that would scan their
5uploads, and I myself floundered with trying to find one for a long time.
5Well, Rodeo Doc at 5213 sent me one that he was using with a RAMdisk and I
5modified it to work with the \TEMP directory. ALL the credit of this file goes
5to Rodeo Doc, #1 @5213. I just modified it to work for me. What it does is
5copies the upload to the \TEMP directory, if it is zipped, arced, packed, or
5arjed, it will unarchive it, then it will scan the programs in the \TEMP
5directory. If it finds a bad upload, it scratches the files. Otherwise, it
5adds a zipcomment file and continues the upload.
51. Enter the INIT program, chose option 6, and enter an upload event filename.
5I used "upload.bat" as mine. Enter it such as "upload.bat %1 %2 %3"
52. Put this following file in the main \WWIV directory and name it "upload.bat"
5------------
@echo Cleaning old files from \TEMP directory...
@echo off
if exist C:\WWIV\TEMP\*.* del C:\WWIV\TEMP\*.* < C:\WWIV\ultest.y
@echo Copying File to test directory ...
@echo Supplied parameter: %2%3
@echo off
copy %2%3 C:\WWIV\TEMP
if exist C:\WWIV\TEMP\*.zip goto zip
if exist C:\WWIV\TEMP\*.arc goto arc
if exist C:\WWIV\TEMP\*.arj goto arj
if exist C:\WWIV\TEMP\*.lzh goto lzh
@echo Unrecognized Archive!
goto bye
:zip
@echo Performing .ZIP uncompression ...
@echo off
pkunzip C:\WWIV\TEMP\*.zip C:\WWIV\TEMP -o
if errorlevel 1 goto bad_ul
goto scan
:arc
@echo Performing .ARC uncompression ...
@echo off
pkunpak C:\WWIV\TEMP\*.arc C:\WWIV\TEMP
if errorlevel 1 goto bad_ul
goto scan
:lzh
@echo Performing .LZH uncompression ...
@echo off
lha e C:\WWIV\TEMP\*.lzh C:\WWIV\TEMP\ /m1 /c1
if errorlevel 1 goto bad_ul
goto scan
:arj
@echo Performing .ARJ uncompression ...
@echo off
arj e -y C:\WWIV\TEMP\*.arj C:\WWIV\TEMP
if errorlevel 1 goto bad_ul
goto scan
:scan
@echo Scanning ...
@echo off
scan /nomem /x /a C:\WWIV\TEMP\*.*
if errorlevel 1 goto bad_ul
@echo Passed all tests!
@echo off
if exist C:\WWIV\TEMP\*.zip goto com_zip
if exist C:\WWIV\TEMP\*.arc goto com_arc
if exist C:\WWIV\TEMP\*.arj goto com_arj
@echo This archive does not support comments!
goto ok
:com_zip
@echo Adding Comment to .ZIP file ...
@echo off
pkzip %2%3 -Z<C:\WWIV\zipcom
goto ok
:com_arj
@echo Adding Comment to .ARJ file ...
@echo off
arj c %2%3 -zC:\WWIV\zipcom
goto ok
:com_arc
@echo Adding Comment to .ARC file ...
@echo off
pkpak c %2%3 <C:\WWIV\zipcom
goto ok
:bad_ul
@echo Bad Upload. Deleting corrupt or virus ridden file ...
@echo off
cd C:\WWIV
del %2%3 < C:\WWIV\ultest.y
:ok
@echo Deleting work files ...
@echo off
if exist C:\WWIV\TEMP\*.* del C:\WWIV\TEMP\*.* < C:\WWIV\ultest.y
cd C:\WWIV
:bye
@echo off
EXIT
5--------------
53. Put McAffee's SCAN.EXE, your archive utilities (pkzip, pkunzip, pkpak,
5lharc, and arj) into the main \WWIV directory as well.
54. Create a file called "ultest.y" and edit it to ONLY hold a "Y" and a
5carriage return in it. Place this in the main \WWIV directory also.
55. Create a Zip comment file named "zipcom" which will hold your BBS name,
5number, etc. This file will be automatically added to the uploaded zip, arc,
5and arj files as they are scanned. Place this in your main \WWIV directory.
56. You should be ready to scan uploads. If you have any problems with this, I
5am sorry. I am not your BBS's momma, so don't write me if it wipes out your
5BBS. Speaking of that, that is probably why no one has uploaded one of these
5before, as some people can screw up anything. If in doubt, make a backup.
1Data*West BBS 2(904)/278-8065 300-2400 Baud 1WWIVNet @9402
3Jacksonville, Florida 5---- 3Gateway to the South