'===========================================================================
' Subject: ADD ADVERTISEMENT TO .ZIP FILE     Date: 06-03-99 (11:16)       
'  Author: David A. Wicker                    Code: QB, QBasic, PDS        
'  Origin: topaz817@fastlane.net            Packet: MISC.ABC
'===========================================================================
' * Add*Ad!  Written by David A. Wicker
' ---------------------------------------------------------------------------
' As always, if you borrow anything from any source code for your
' shareware or freeware projects, please give credit to the original author!
' ---------------------------------------------------------------------------

' * This is a really annoying program for downloaders but useful to ego-
' uploaders who insist on including their calling card in every single PKZIP
' they send out.
'
' What it will do is get an entire list of all PKZIPs in the current
' directory and insert one or more calling card files of your choice inside
' each and every PKZIP; even if there are several hundred PKZIP files.  :)
' The calling card file(s) must be local to this directory as well, and, of
' course, this program requires PKZIP v2.04g.

DEFINT A-Z
'$DYNAMIC

DEF FNPad$ (A$, A) = A$ + SPACE$(A - LEN(A$))

CLS
LOCATE 24
COLOR 14
PRINT "Stuff Ad!"
PRINT
COLOR 12
PRINT "We know who you are!"
COLOR 7
PRINT
PRINT "Type in the calling card file(s) to add,"
PRINT "I.E.: READ.ME! RUNME.HTM AUTHOR.GIF"
PRINT "Will add all 3 of these files to every single PKZIP local to this"
PRINT "directory.  Now isn't that annoying!  :)"
PRINT "Naturally, all the files entered must exist!"
PRINT
PRINT "Name(s) of files to add or [ENTER] to quit."
INPUT ": ", I$
IF I$ = "" THEN END
SHELL "dir /b *.zip>dir.___"
OPEN "i", 1, "dir.___"
WHILE EOF(1) = 0
  LINE INPUT #1, F$
  PRINT FNPad$(F$, 12);
  SHELL "pkzip -ex " + F$ + " " + I$ + ">nul"
  PRINT " > Okay!"
WEND
CLOSE
KILL "dir.___"
PRINT
PRINT "Complete!"
