'Eudora 3.x automatic mailbox repair tool
'placed in the public domain 02/06/2002
'requires PowerBasic 2 or higher to complie
print "Eudora 3.x mailbox repair tool - 1.2 1/27/2002"
input "Enter YES to process all mailbox files: ", okin$
if ucase$(okin$) <> "YES" then 'user must verify
  print "Program terminated"
end if
k$ = dir$("*.mbx") 'find them all
while k$<>""
  inline = 0       'initialize line counters
  outline = 0
  inf$ = lcase$(k$)
  dotloc% = instr(inf$,".")  
  savfile$ = left$(inf$,dotloc%) + "old" 'create name for backup copy
  print "Processing mailbox : ";inf$
  print inf$" will be renamed to: ";savfile$
  outf$ =  left$(inf$,dotloc%) + "fix"
  open inf$ for input as 1
  open outf$ for output as 2
  while eof(1) <> -1
    line input #1, x$
    incr inline
    markerloc% = instr(x$, "From ???@???") 'Eudora intermessage marker
    if markerloc% > 1 then               'if not at start of line
      print #2, left$(x$, markerloc%-1)  'split into two lines
      print #2, mid$(x$, markerloc%)
      incr outline, 2
      print #2, x$
      incr outline
    end if
  print "Lines in: ";inline     'if errors found, inline > outline
  print "Lines out: ";outline
  name inf$ as savfile$         'backup copy
  name outf$ as inf$            'working copy
  k$ = dir$                     'get next file
print "Mailbox repair complete"

color bar
Home page
Last update 07/18/2002. This page is eudorafx.html
Copyright © 2002 John E. Carter All Rights Reserved