home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT36 / CONVERT.ZIP / CONVERT.BAT < prev    next >
DOS Batch File  |  1994-04-20  |  1KB  |  45 lines

  1. @ECHO OFF
  2. if '%1' == '' goto USAGE
  3. if '%2' == '' goto USAGE
  4. if '%3' == '' goto USAGE
  5. if not exist %1 goto EIN
  6. if exist DSK3\%2 goto EOUT
  7. if not exist %3.hdr goto ETYPE
  8.  
  9. ECHO Converting "%1" to a "DSK3.%2 (%3)" file...
  10. MKDIR TEMP
  11. copy %1 IN
  12. stuffkey IN#013OUT#013N
  13. stripper
  14. copy %3.hdr+OUT /b TEMP\%2
  15. translate DSK3 TEMP
  16. DEL IN
  17. DEL OUT
  18. DEL TEMP\%2
  19. RMDIR TEMP
  20. goto END
  21.  
  22. :USAGE
  23. ECHO ╔════════════════════════════════════════════════════════════════════════╗
  24. ECHO ║USAGE: Convert [oldname] [newname] [filetype]                           ║
  25. ECHO ╟────────────────────────────────────────────────────────────────────────╢
  26. ECHO ║[oldname]  = Full path/filename of XMODEM (upload) file to be converted.║
  27. ECHO ║[newname]  = Filename of converted file to be loaded into "DSK3." drive.║
  28. ECHO ║[filetype] = Type of file. : DF80 , DV80 , DF128 , IF128 , IV254 , PROG ║
  29. ECHO ╚════════════════════════════════════════════════════════════════════════╝
  30. goto END
  31.  
  32. :EIN
  33. ECHO ERROR: Input file does not exist.
  34. goto END
  35.  
  36. :EOUT
  37. ECHO ERROR: Output file already exists.
  38. goto END
  39.  
  40. :ETYPE
  41. ECHO ERROR: File type does not exist.
  42. goto END
  43.  
  44. :END
  45.