home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UTILITY / ZERODLS.ZIP / ZERODLS.BAS < prev   
BASIC Source File  |  1997-03-04  |  2KB  |  40 lines

  1. Crossfire #1 @8854
  2. Sat Mar 01 20:21:43 1997
  3. Regarding: Im looking for
  4. By       : The Pirate #1 @2908
  5.  
  6. 4-->0 Im looking for a program that will zero out all users upload and downloadin
  7. 4-->0 info. If there is a program out there please let me know
  8.  
  9.      If you have QBASIC, you can use this short program that I slapped together
  10. in response to your question...
  11.  
  12. ----------[ cut here ]----------
  13. DEFINT A-Z
  14. OPEN "R", #1, "\WWIV\DATA\USER.LST", 1024
  15. ' NOTE: Change the filename above if your USER.LST is in a different path
  16. Recs = LOF(1) / 1024                    ' Count the number of users
  17. Temp$ = SPACE$(1024)                    ' Set up a buffer, size of userrec
  18. FOR R = 2 TO Recs                       ' Start loop at record #2 [sysop]
  19.   GET #1, R, Temp$                      ' Read user record into buffer
  20.   MID$(Temp$, 715, 2) = MKI$(0)         ' Files uploaded = 0
  21.   MID$(Temp$, 717, 2) = MKI$(0)         ' Files downloaded = 0
  22.   MID$(Temp$, 789, 4) = MKL$(0)         ' Kilobytes uploaded = 0
  23.   MID$(Temp$, 793, 4) = MKL$(0)         ' Kilobytes downloaded = 0
  24.   MID$(Temp$, 809, 4) = MKL$(0)         ' File points = 0
  25.   PUT #1, R, Temp$                      ' Write changed data to file
  26. NEXT R                                  ' Continue for all users
  27. CLOSE #1                                ' Close the file
  28. ----------[ cut here ]----------
  29.  
  30.      If you don't want to zero out YOUR info, change the sixth line to start
  31. the loop at record 3:
  32.  
  33. FOR R = 3 TO Recs
  34.  
  35.      The very first record in USER.LST is a null record.  The sysop's record is
  36. at #2.  This program *SHOULD* work, but I would advise you to back up your
  37. USER.LST before you try it, just in case.  The program assumes you have a stock
  38. WWIV 4.22+ userrec.  Change the filename in the second line if your USER.LST is
  39. not in \WWIV\DATA.
  40.