home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / emis14p.zip / zocmt.cmd < prev    next >
OS/2 REXX Batch file  |  1994-12-30  |  1KB  |  46 lines

  1. /* 
  2. Rexx script für ZOC QuarkTausch.
  3.  
  4. Autor: Carsten Härle
  5. Version: 1.0
  6. Datum: 28.12.94
  7.  
  8. Beim Aufruf ist das aktuelle Verzeichnis das Emis/PM-Verzeichnis.
  9. Als Parameter wird das Verzeichnis der Mitteilungsbank übergeben.
  10. Dort befindet sich ein INFILE.ZIP und wird ein OUTFILE.ZIP hinterlassen.
  11. */
  12. arg msgBaseDir
  13.  
  14. /* Variablen setzen */
  15. mmDir = directory()
  16. Call directory msgBaseDir 
  17. zocdir = linein('zocmt.cfg')
  18. zocdownload = linein('zocmt.cfg')
  19.  
  20. /* Variablen prüfen */
  21. if zocdir = "" || zocdownload = "" Then
  22.     Error("Die Datei 'zocmt.cfg' nicht vorhanden", 10100)
  23.  
  24. /* Erstelle Hilfsskript für ZOC */
  25. 'del zocmt1.scr'
  26. if stream('zocmt1.scr', 'c', 'open write') \= 'READY:' Then 
  27.     Error("Die Hilfsdatei 'zocmt1.scr' konnte nicht erstellt werden.", 10103)
  28. if lineout('zocmt1.scr', 'extern "' || mmdir || '\zocmt.scr" "' || msgBaseDir || '"') \= 0 Then
  29.     Error("Die Hilfsdatei 'zocmt1.scr' konnte nicht erstellt werden.", 10103)
  30. if stream('zocmt1.scr', 'c', 'close') \= 'READY:' Then
  31.     Error("Die Hilfsdatei 'zocmt1.scr' konnte nicht erstellt werden.", 10103)
  32.  
  33.  
  34. /* Starte ZOC */
  35. 'del' zocdownload || '\outfile.*'
  36. call directory zocdir 
  37. 'zoc /u /s:' || msgBaseDir || '\zocmt1.scr'
  38. 'copy' zocdownload || '\outfile.zip' mmDir
  39. 'del' zocdownload || '\outfile.zip'
  40. Exit 0
  41.  
  42. /* Fehlerbehandlung */
  43. Error:
  44. Say "FEHLER ("arg(2)"): " arg(1)
  45. Exit arg(2)
  46.