Batch Editor v. 0.41 Beta
[Updated: 2 Oct. 2000]
- Under no circumstances the author is liable for any loss or damage.
-
You are free to use this version of the program on as many machines as you
like.
-
You are free to distribute the program provided that you include all the
files in the archive without any modification.
-
You are not allowed to sell the program, but can charge a reasonable amount
to cover the cost of the distribution media.
-
The use of the program implies acceptance of the conditions stated above!
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 path.
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.
- Various bug fixes
- Check the correctness of the structure of the editation profiles.
- Improved keyboard usage
- C language escape sequences are allowed as find/replace strings
- The file listbox is WPS aware (you can drag one or more files
from a folder and drop them onto the listbox)
- The editation profile (i.e. the list of files and strings)
may be saved and loaded at any time.
You just need to copy in any directory the following files (they must
be in the same directory):
BATCHED.EXE
SMWUTIL.DLL
PROGRESS.DLL
BATCHED.HTM (User's guide)
BE*.GIF (images used by the documentation)
Then create a program object (if you have warp 4 you just have
to drag the BATCHED.EXE icon and drop it in your favorite folder) setting:
- Program page:
-
- Path and file name:
- BATCHED.EXE including the full path of the file
- Parameters:
- %*
- Working directory:
- The full path were you installed the program files
- Association page:
-
- Write *.BEP in the New name: field
and click on the Add button
- Icon page:
-
- Title:
- Batch editor
The program doesn't need any config.sys modification and doesn't
write any data to the system INI files.
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 wildchars * 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 on 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 for editing.
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 keyboard.
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 insensitive mode.
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 are:
- \a
- alarm (hexadecimal value: 0x07)
- \b
- backspace (hexadecimal value: 0x08)
- \f
- form feed (hexadecimal value: 0x0c)
- \n
- new line (hexadecimal value: 0x0a)
- \r
- return (hexadecimal value: 0x0d)
- \t
- horizontal tab (hexadecimal value: 0x09)
- \v
- 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)
- \xnn
- 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 (editation profile).
The Load button loads a previously saved editation profile
in the current window.
The editation profile 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.
Notes:
- 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 correctly!
- 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.
- Better interface with resizeable window and listboxes width.
- Settings notebook for setting the favourite font and other options.
- Statusbar for contextual help, error and warning messages, progress
display.
- Strings list check in order to avoid conflicts.
- Import of list of files and substitutions from text files.
- Export of lists of files or substitutions as text files.
- Substitutions of strings according to the GREP and EGREP syntax.
- Back up of the processed file with options for packing them through
an external program.
- Preview of substitions whith the feature to exclude some substitutions.
- Double progress bar for the number of files and for the bytes processed.
- REXX support to make the program more powerful and make it work as a
file format converter.
As a limited features beta, this version is completely free.
A more complete future versione will probably be shareware.
Alessandro Cantatore