Batch Editor is a small multithreaded PM application which allows to find
and replace a list of strings in one or more files.
You can use it to edit text files or binary files.
Replacing paths references in the system files and application INI files
you can use it to update them when you move an application to a different
You can even use it on your system files, when moving your OS/2 installation to a different drive/partition, by replacing all the partition letter occurrences.
The program consists in two listboxes and few buttons which are enabled or
disabled as needed.
The File controls
The purpose of the listbox on the left, Files: , is to list
all the files which are to be edited.
File names can include the wildcards* and?.
To add a file name to the list you can write its full path in the entryfield
below the Files: listbox and click on the Add button, select one or more files through the dialog which pops-up when you click on
the Find... button, or, more easily, just open a folder and
drag the files you want to edit dropping them onto the listbox.
When a file name is selected from the Files: list, the Remove
button and the Recur subdirectories checkbox are enabled. The
Remove button deletes the selected file name from the list, while
the checkbox allows to search all the matching file names through the subdirectories
of the pathname selected in the listbox.
A double click on a file name put the file name back in the entry field
As soon as some text is typed in the File entryfield, the Add button becomes the default one, so you just need to press the Enter key, once the file name is completed, to have it added to the list. Then
the File entryfield gets again the focus and you can type the next file name.
This way it is very easy to create a list of files just typing through the
The Strings controls
The couples of strings to be found and replaced are listed in the listbox
on the right, Strings: , separated by an arrow" -> ".
The entryfields Find: and Replace: and the button
Add allow to add a couple of strings to the list.
When the Replace field is empty, all the found strings are just
deleted. The Remove button and double clicks on the items in
the list work as in the Files: list.
The Remove all button removes all the strings without any further
request of confirmation.
It is easy to create a list of find/replace strings using just
the keyboard. Just start typing in the Find: field: the Add button will be enabled. As soon as the find string has been
completed you can press the Enter key to give focus to the Replace: field. Now you can type the replace string and press Enter ,
or just press Enter , if the replace string is an empty one:
the find/replace string pair will be added to the Strings
list and the focus will go back to the Find field allowing you to enter the next string pair.
The checkbox Case insensitive is enabled as soon as one item
in the list is selected and will allow to search the selected string in case
The checkbox Escape chars , enabled on item selection, means that the selected item will be interpreted as a sequence of escape characters.
The escape character is the slash: \. Valid escape sequences
alarm (hexadecimal value: 0x07)
backspace (hexadecimal value: 0x08)
form feed (hexadecimal value: 0x0c)
new line (hexadecimal value: 0x0a)
return (hexadecimal value: 0x0d)
horizontal tab (hexadecimal value: 0x09)
vertical tab (hexadecimal value: 0x0b)
single quote (hexadecimal value: 0x27)
double quote (hexadecimal value: 0x22)
question mark (hexadecimal value: 0x3f)
the escape char \itself (hexadecimal value: 0x5c)
any character by its hexadecimal value
The other buttons
Once you have filled the two lists, according to your needs, you must click
on the Start button to start the editing procedure.
A progress dialog allows to monitor the elaboration. The Stop
button in this dialog will terminate the procedure.
Through the Save button it is possible to save the current lists of files and strings with the relative find/replace options, in a binary
file (edition profile).
The Load button loads a previously saved edition profile in the current window.
The edition profiles are saved by default with a*.bep extension.
For that reason, associating this kind of file to the program, a double click
on the document icon will allow to launch Batch editor.
The options (Recur subdirectories, Case insensitive, Escape chars ) do not apply to all files or strings but only to the selected ones.
The escape sequences \', \"and \?are just
for the purpose of compatibility with C source code (if you are filling the
fields by pasting stings from a C source code file).
You can directly type ', "or ?, without any
preceding \, in a string with escape sequences: they will be interpreted
When specifying a character by its hexadecimal value, you must include
2 hexadecimal digits, otherwise it will not be interpreted correctly. For
instance, valid escape sequences of this type are: \x09( \x9
is considered an error), \x90 , \xff, etc...
The current version of Batch Editor doesn't perform any check on the
strings inserted in the listbox. Since strings are seeked and replaced in
the same order as they appear in the list, the order is critical when the
list of strings to be found contains strings which are sub-strings of other
strings. To avoid undesired substitutions the sub-strings must be listed
below the strings.
No option is yet provided for word search. I.e. if you enter
copy as string to be searched all the occurrences of copy
and of words including copy will be edited. To avoid the substitution
of some words you must substitute them with themselves. For instance, to preserve
all occurrences of copyFiles just put this couple of strings: copyFiles -> copyFiles above copy -> ...
in the list.
WARNING: The program doesn't save a backup copy of the files
which are beeing edited. You must do it yourself if the files are critical.