README.TXT 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. DOS2UNIX/UNIX2DOS - Win32 utilities to convert single files from
  2. MS-DOS to Unix format or Unix to MS-DOS format.
  3. Introduction
  4. ------------
  5. MS-DOS and Unix systems use different methods to identify end-of-line
  6. information in text files. MS-DOS, including Windows 9x/ME/NT/2000, use a
  7. carriage return/linefeed pair (CR/LF), whilst Unix only uses the LF
  8. character.
  9. DOS2UNIX.EXE and UNIX2DOS.EXE are small Win32 console-mode file conversion
  10. utilities. DOS2UNIX.EXE converts MS-DOS text files to Unix format, by
  11. stripping any CR or end-of-file (Ctrl-Z) characters from the data.
  12. UNIX2DOS.EXE inserts a CR character when it encounters an LF character,
  13. converting the data to MS-DOS format.
  14. The source code for these utilities was obtained via the Internet. The
  15. original author of the code is unknown. The utilities have been converted to
  16. run on Win32 systems, using Microsoft Visual C/C++ v6.0. The code has been
  17. modified so that it compiles cleanly and executes as expected. A small amount
  18. of additional code has been added to aid failure reporting when the utilities
  19. are used in batch scripts and a small bug in the UNIX2DOS code was fixed in
  20. August 2000. In all other respects the source code is unchanged from its
  21. original release date, sometime during 1989.
  22. Usage
  23. -----
  24. The programs have been written primarily for use within Windows 9x/ME/NT/2000
  25. console window sessions (ie: COMMAND.COM/CMD.EXE), but may also be used
  26. within batch scripts (BAT/CMD files, Perl scripts etc.).
  27. DOS2UNIX.EXE
  28. ------------
  29. To convert a file from MS-DOS to Unix format, DOS2UNIX.EXE is executed using
  30. the syntax:
  31. DOS2UNIX <file to be converted>
  32. for example:
  33. DOS2UNIX dosdata.txt
  34. UNIX2DOS.EXE
  35. ------------
  36. To convert a file from Unix to MS-DOS format, UNIX2DOS.EXE is executed using
  37. the syntax:
  38. UNIX2DOS <file to be converted>
  39. for example:
  40. UNIX2DOS unixdata.txt
  41. Messages
  42. --------
  43. During execution, the programs may display any of the following messages.
  44. ---> Processing file <file being converted> ...
  45. This message indicates normal progress.
  46. ---> Can't stat <file to be converted>.
  47. This message indicates that the file to be converted cannot be found. Check
  48. that the name of the file, including any path/relative path information is
  49. correct, then try again.
  50. ---> Problems processing file <file to be converted>.
  51. A problem was encountered during the file conversion process. The resultant
  52. data should be considered suspect.
  53. ---> Problems renaming <temporary file> to <file being converted>.
  54. However, file <temporary file> remains.
  55. During the conversion process, a temporary work file is created containing
  56. the converted data. The above message indicates that there was a problem
  57. renaming the temporary file at the end of the conversion process so that it
  58. has the name of the original file being converted. The converted data should
  59. however exist in the temporary file left behind at the end of the failed
  60. conversion.
  61. Points to note
  62. --------------
  63. 1) If a file conversion failure occurs, both utilities will return an
  64. errorlevel of one, allowing the results of the conversion process to be
  65. examined within a standard Windows 9x/ME/NT/2000 batch script.
  66. 2) The programs are not coded to deal with Windows NT/2000 file system
  67. permissions. Unpredictable results may occur if insufficent permissions exist
  68. for the utilities to read/write data as required.
  69. 3) The programs are intended to process text data files only. Unpredictable
  70. results will occur if other, non-text, file types are specified for
  71. conversion.
  72. 4) As the utilities preserve the original file name of the converted file,
  73. the input file is effectively destroyed. It is essential therefore to backup
  74. any data files to be processed before starting any conversion, in case a
  75. problem occurs which leaves the original data in an unusable state.
  76. Known problems
  77. --------------
  78. Problems may be experienced when attempting to convert text files 2GB or
  79. greater in size. The author has received one report of such an issue with
  80. DOS2UNIX.EXE.
  81. Testing
  82. -------
  83. The programs have been tested on Windows NT 3.51 with service pack #5
  84. applied, Windows NT4.0 with various service packs applied, Windows 2000 and
  85. Windows 95 OSR2. The programs should also execute on Windows 98/98SE, but
  86. this has not been verified.
  87. License/disclaimers
  88. -------------------
  89. See file LICENSE.TXT for further information. All registered trade marks etc.
  90. are acknowledged.
  91. Author's contact details
  92. ------------------------
  93. Clem Dye
  94. [email protected]