home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / prm2nsm.zip / convert.cmd < prev    next >
OS/2 REXX Batch file  |  1998-11-16  |  878b  |  30 lines

  1. /*  */
  2. argsgood = 1
  3. appenddata = 0
  4. prmdir="."
  5. netscapeFile="Infile"
  6. if (Arg() <> 1) then 
  7.     argsgood = 0
  8. else do 
  9.     prmdir = SUBWORD(arg(1), 1, 1)
  10.     netscapeFile = SUBWORD(arg(1), 2, 1)
  11.     if (SUBWORD(arg(1), 3, 1) == "-a") then
  12.         appenddata = 1
  13. end
  14. prmdir=prmdir||"\."
  15.  
  16. if argsgood <> 1 then do
  17.     Say "Usage:  Convert <PRM directory with .POP files> <Netscape mail file> [-a]"
  18.     Say "Before running this program you need to create the appropriate folders"
  19.     Say "you are trying to convert in Netscape.  You will overwrite the file"
  20.     Say "in Netscape under X:\Netscape\Users\yourname\Mail\INBOX.sbd\ with the"
  21.     Say "target Netscape mail file you specify."
  22.     Say "Use -a to append on to an existing Netscape mail file"
  23. end
  24. else do
  25.     if (appenddata == 0) then
  26.         "java Convert "||prmdir||" > "netscapeFile
  27.     else
  28.         "java Convert "||prmdir||" >> "netscapeFile
  29. end
  30.