home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Bila Vrana
/
BILA_VRANA.iso
/
007A
/
GIFGAT21.ZIP
/
TGIF.BAT
< prev
Wrap
DOS Batch File
|
1994-07-29
|
6KB
|
164 lines
@ECHO OFF
REM TGIF.BAT uses GIFGATE to test GIF Uploads
REM %1 = Full path and filename of upload (C:\RBBS\UPLOAD\FILENAME.GIF)
REM %2 = Full path and filename of RBBS error flag file
REM This batch file is for RBBS! You will have to tailor it to suit
REM your BBS software if you run something else!
IF %3.==CALL. GOTO MSG%4
GIFGATE %1 /w640 /h480 /c256 /y90 /g /t /lc:\rbbs\node%node%\gifgate.log
REM GIFGATE ERRORLEVEL Exits
REM The Width, Height, Colors, Size, Year, and Giflite errorlevels exits
REM can all be added up to give a total of 63 possible combination of
REM fails. The errorlevel exits for each of these parameters are as follows:
REM ERRORLEVEL SYMBOL IN LABEL
REM 1 - Width Below Minimum W
REM 2 - Height Below Minimum H
REM 4 - Colors Below Minimum C
REM 8 - File Size Below Minimum S
REM 16 - Year Before Minimum Y
REM 32 - GifLite'd GIF G
REM Even if you do not use ALL of the possible command line switches for
REM GIFGATE, it is reccommended that you leave all the ERRORLEVEL exit
REM routines in this batch file anyway.
IF ERRORLEVEL 255 GOTO UNKNOWN
IF ERRORLEVEL 254 GOTO NOTFOUND
IF ERRORLEVEL 253 GOTO BAD_LOG
IF ERRORLEVEL 250 GOTO BAD_FORMAT
IF ERRORLEVEL 63 %0 %1 %2 CALL G Y S C H W
IF ERRORLEVEL 62 %0 %1 %2 CALL G Y S C H
IF ERRORLEVEL 61 %0 %1 %2 CALL G Y S C W
IF ERRORLEVEL 60 %0 %1 %2 CALL G Y S C
IF ERRORLEVEL 59 %0 %1 %2 CALL G Y S H W
IF ERRORLEVEL 58 %0 %1 %2 CALL G Y S H
IF ERRORLEVEL 57 %0 %1 %2 CALL G Y S W
IF ERRORLEVEL 56 %0 %1 %2 CALL G Y S
IF ERRORLEVEL 55 %0 %1 %2 CALL G Y C H W
IF ERRORLEVEL 54 %0 %1 %2 CALL G Y C H
IF ERRORLEVEL 53 %0 %1 %2 CALL G Y C W
IF ERRORLEVEL 52 %0 %1 %2 CALL G Y C
IF ERRORLEVEL 51 %0 %1 %2 CALL G Y H W
IF ERRORLEVEL 50 %0 %1 %2 CALL G Y H
IF ERRORLEVEL 49 %0 %1 %2 CALL G Y W
IF ERRORLEVEL 48 %0 %1 %2 CALL G Y
IF ERRORLEVEL 47 %0 %1 %2 CALL G S C H W
IF ERRORLEVEL 46 %0 %1 %2 CALL G S C H
IF ERRORLEVEL 45 %0 %1 %2 CALL G S C W
IF ERRORLEVEL 44 %0 %1 %2 CALL G S C
IF ERRORLEVEL 43 %0 %1 %2 CALL G S H W
IF ERRORLEVEL 42 %0 %1 %2 CALL G S H
IF ERRORLEVEL 41 %0 %1 %2 CALL G S W
IF ERRORLEVEL 40 %0 %1 %2 CALL G S
IF ERRORLEVEL 39 %0 %1 %2 CALL G C H W
IF ERRORLEVEL 38 %0 %1 %2 CALL G C H
IF ERRORLEVEL 37 %0 %1 %2 CALL G C W
IF ERRORLEVEL 36 %0 %1 %2 CALL G C
IF ERRORLEVEL 35 %0 %1 %2 CALL G H W
IF ERRORLEVEL 34 %0 %1 %2 CALL G H
IF ERRORLEVEL 33 %0 %1 %2 CALL G W
IF ERRORLEVEL 32 %0 %1 %2 CALL G
IF ERRORLEVEL 31 %0 %1 %2 CALL Y S C H W
IF ERRORLEVEL 30 %0 %1 %2 CALL Y S C H
IF ERRORLEVEL 29 %0 %1 %2 CALL Y S C W
IF ERRORLEVEL 28 %0 %1 %2 CALL Y S C
IF ERRORLEVEL 27 %0 %1 %2 CALL Y S H W
IF ERRORLEVEL 26 %0 %1 %2 CALL Y S H
IF ERRORLEVEL 25 %0 %1 %2 CALL Y S W
IF ERRORLEVEL 24 %0 %1 %2 CALL Y S
IF ERRORLEVEL 23 %0 %1 %2 CALL Y C H W
IF ERRORLEVEL 22 %0 %1 %2 CALL Y C H
IF ERRORLEVEL 21 %0 %1 %2 CALL Y C W
IF ERRORLEVEL 20 %0 %1 %2 CALL Y C
IF ERRORLEVEL 19 %0 %1 %2 CALL Y H W
IF ERRORLEVEL 18 %0 %1 %2 CALL Y H
IF ERRORLEVEL 17 %0 %1 %2 CALL Y W
IF ERRORLEVEL 16 %0 %1 %2 CALL Y
IF ERRORLEVEL 15 %0 %1 %2 CALL S C H W
IF ERRORLEVEL 14 %0 %1 %2 CALL S C H
IF ERRORLEVEL 13 %0 %1 %2 CALL S C W
IF ERRORLEVEL 12 %0 %1 %2 CALL S C
IF ERRORLEVEL 11 %0 %1 %2 CALL S H W
IF ERRORLEVEL 10 %0 %1 %2 CALL S H
IF ERRORLEVEL 9 %0 %1 %2 CALL S W
IF ERRORLEVEL 8 %0 %1 %2 CALL S
IF ERRORLEVEL 7 %0 %1 %2 CALL C H W
IF ERRORLEVEL 6 %0 %1 %2 CALL C H
IF ERRORLEVEL 5 %0 %1 %2 CALL C W
IF ERRORLEVEL 4 %0 %1 %2 CALL C
IF ERRORLEVEL 3 %0 %1 %2 CALL H W
IF ERRORLEVEL 2 %0 %1 %2 CALL H
IF ERRORLEVEL 1 %0 %1 %2 CALL W
IF ERRORLEVEL 0 GOTO GOOD_GIF
:UNKNOWN
proecho %node% ~A Program Error occurred during testing!
GOTO BAD_TEST
:NOTFOUND
proecho %node% ~Sorry, your upload was not found!
GOTO BAD_TEST
:BAD_LOG
proecho %node% ~Sorry, this upload could not be logged!
GOTO BAD_TEST
:BAD_FORMAT
proecho %node% ~The GIF you Uploaded has a BAD header or is Incomplete!~
GOTO BAD_GIF
:MSGW
proecho %node% ~The GIF you Uploaded is BELOW the minimum RESOLUTION for WIDTH!
proecho %node% ~All Uploads MUST be at least 638 pixels wide!~
goto NEXTMSG
:MSGH
proecho %node% ~The GIF you Uploaded is BELOW the minimum RESOLUTION for LENGTH!
proecho %node% ~All Uploads MUST be at least 398 pixels in length!~
goto NEXTMSG
:MSGC
proecho %node% ~The GIF you Uploaded is BELOW the mimimum requirements for COLORS!
proecho %node% ~All Uploads MUST have at least 256 colors!~
goto NEXTMSG
:MSGS
proecho %node% ~The GIF you Uploaded is BELOW the minimum requirement for SIZE!
proecho %node% ~All Uploads MUST be at least 30k in Size!~
goto NEXTMSG
:MSGY
proecho %node% ~The GIF you Uploaded is too OLD!
proecho %node% ~All Uploads MUST be dated 1990 or newer!~
goto NEXTMSG
:MSGG
proecho %node% ~The GIF you Uploaded has been GIFLITE'd!
proecho %node% ~This BBS does not accept GIF uploads that have been GIFLITE'd!~
:NEXTMSG
if .%3==. GOTO BAD_GIF
%0 %1 %2 CALL %5 %6 %7 %8 %9
:BAD_TEST
proecho %node% ~Please tell Sysop!~
:BAD_GIF
COPY %1 C:\RBBS\BADFILES
DEL %1
ECHO ERROR > %2
GOTO END
:GOOD_GIF
proecho %node% ~No Errors Detected!~
IF EXIST %2 DEL %2
:END
SETERROR 0