Operations

Introduction

The Operations menu is used to execute operations on files. Operations are actions to be applied to a subset of the files in the file table specified by one or more select lists. These actions are things like searching for text within the files, running commands on the files, or interactively operating on the files.

Operations bring up a popup dialog window which allows the parameters for the operation to be set before execution. If select lists are already selected in the select list table, then those select lists will be pre-selected when the dialog appears. Otherwise the select lists to operate on can be selected after the operation dialog appears.

Some operations take a while to execute since they require disk accesses or system processes to operate on the files. For these slow operations, a progress dialog will appear displaying the current file being operated on, along with the number of files which have been processed. The progress dialog has a CANCEL button which can be used to stop the execution of the operation before it would otherwise complete.

After most operations have completed, a summary dialog giving the final results of the operation is displayed.

The results of operations can result in the files being added to particular manual select lists, as specified in the operation dialog. If no select list is selected, then no select list will have files put into it. If the special <NEW> select list item is selected, then a new manual select list will be prompted for before the operation starts. If the special <TEMP> select list item is selected, then a new automatically named manual select list is created before the operation starts. A check box indicates whether or not to clear the specified results select list before storing the new results. If the select list is not cleared, then files will be added to the ones already in the select list.

Find File Names Operation

This operation scans the path names of the selected files for patterns and puts the matching files into a select list. This does not examine the contents of the files, only their names.

The patterns can match various parts of the path names, and can use regular expressions or not, and can match the complete part of the path or just a substring of it.

The files whose names are matched can be put into a manual select list, and the files whose names are not matched can be put into another manual select list.

Search Files For Text Operation

This searches the selected files looking for patterns within the lines of the files. The search is only concerned with whether or not there is at least one line in a file which matches.

The search can use regular expressions or not, and can match while ignoring case differences or not.

The files which had matching lines can be put into a manual select list, the files without any matching lines can be put into another manual select list, and the files which could not be searched can be put into a third manual select list.

Run External Command On Files Operation

This operation runs the specified external program on each selected file. The dialog accepts the command name along with any required arguments. The arguments are separated by spaces. Either a single quote or a double quote character can be used to include spaces within an argument.

The special string value of % represents the full path of the file the command is run on. If this string does not appear in the command arguments, then the file name will be appended to the command arguments as the last argument.

The results of the command execution can be used to put the files into one of several select lists. This is based on the exit status of the program. The exit status values of zero, one, and default (for any other values) are available. Check boxes indicate whether these exit status values are to be considered errors. This error status is only used for the summary dialog when the operation completes.

Calculate Checksums on Files Operation

This operation calculates the MD5 hash on the data within selected files. The resulting hash values can be displayed as one of the columns in the file table.

Directories also have a hash value which is calculated by generating the MD5 checksum on the sorted list of file names within the directory.

Probe Content Types Of Files

This operation examines the selected files to determine their content type. This is determined either by using their extension or by examining some of the bytes of the files.

The content type values are MIME strings (for example, image/gif).

Interactively Operate On Files Operation

This operation brings up a dialog which allows the selected files to be individually examined and processed.

Firstly, one or more select lists must be selected, and then the Use List button is clicked. This results in the selected files appearing in a scrollable list. Clicking on a file in the scrollable list then selects that particular file for action. The normal movement commands can also be used within the scrollable list to select the file to act on.

Information about the currently selected file is shown at the upper right. Also, if auto viewing is enabled, or if one of the view buttons is pressed, some of the contents of the file is shown in a viewing panel.

The viewing panel can show either an ASCII representation of the file data or a binary HEX representation of the file. This is automatically determined by the files's extension. Clicking on a specific viewing button can change the format.

The action buttons can be used to open the file in the editor program associated with the file extension, run an external command on the file, or add or remove the file from a manual select list.

When adding or removing a file from a select list, a check box can be ticked which adds a button to the action panel making it easy to add or remove other files to the same select list.

The v, t, and b can also be used either within the file list or the viewing panel. These force the default view to be shown, force the ASCII text to be shown, or force the binary HEX representation to be shown. In the viewing panel, the n and p keys can be used to move to the next or previous file in the list.