Convert all files in a folder (tree) from DOS to UNIXThere is the command
File - Conversions - DOS to UNIX which can be used also in macros and scripts. It is strongly recommended to use this command on files opened already in UltraEdit or UEStudio. The command is also available from context menu of a file tab.
But in case of the need to convert all
DOS line terminations to
UNIX in all files in a directory or a directory tree, it is better to use a
Replace in Files for this task.
With the
Perl or
Unix regular expression engine:
Find What:
\r\nReplace With:
\nWith the
UltraEdit regular expression engine or without using the regular expression option:
Find What:
^pReplace With:
^n
Convert all files in a folder (tree) from UNIX to DOSThere is the command
File - Conversions - UNIX/MAC to DOS which can be used also in macros and scripts. It is strongly recommended to use this command on files opened already in UltraEdit or UEStudio. The command is also available from context menu of a file tab.
But in case of the need to convert all
UNIX line terminators to
DOS in all files in a folder or a folder structure, it is better to use
Replace in Files for this task.
Simply use following without using the regular expression option:
Find What:
^nReplace With:
^pBut this can easily result in a carriage return + carriage return + linefeed sequence if some of the files contain already DOS line terminations. Therefore a second
Replace in Files should be executed to make sure that such a line terminator sequence does not exist now in any file respectively correct them:
Find What:
^r^pReplace With:
^pThis normal, non regular expression replace can be used also to fix CR CR LF sequences in files
- created by applications opening a file in text mode and writing \r\n to the file instead of only \n as required in this case;
- downloaded in ASCII mode from a webserver on which the files are stored already with DOS line terminations.