VOICE Home Page: http://www.os2voice.org | November 2004 Newsletter Index < Previous Page | Next Page > Feature Index editor@os2voice.org

## F - file manager and power-user's toolbox

By Christian Hennecke © November 2004

For some reason, there are certain kinds of tools which have an extremely high number of incarnations on nearly every platform - FTP clients and file managers, for instance. F's authors acknowledge that fact but wrote this file manager anyway because they felt that other products did not include all the features they needed.
F is freely available for several platforms including OS/2, a number of Unices, and Windows. The OS/2 version includes support for a number of OS/2-specific features.
While F is similar to other file managers in some respects, there are some things which make it distinctly different from - in both terms of features and the user-interface - and superior to its peers.

### Installation and Update

There is no special installation, the downloadable executable has to be placed in the desired location. Upon first execution, it creates a number of required files for setup and startup.

Updates are applied with a special command at run-time which backups the old executable, replaces it with the new one, updates the sample configuration files, and restarts F into the new version.

### User interface

F is a textmode-only application and doesn't offer any mouse support. This means that drag and drop of files is not possible, nor can you select options and actions from any clickable menus. Instead commands are issued by keyboard shortcuts and a command line. Configuration options can be setup via a textfile only, although with the majority of options changes become effective at run-time.

The built-in extensive online help and FAQ provide detailed information for each component and command with many usage examples. The help feature consists of one large screen that is opened in the file viewer and thus has all of its features (see below). It is context-sensitive in that it automatically jumps to the section for the currently active component or the command it was invoked for.

Unlike other file managers, F doesn't mimic the classic Norton Commander. Hotkeys follow their own logic and are grouped by application to the currently highlighted file or the currently selected set of files. The split-window display does remind one of Norton Commander at first but goes beyond that.

#### File windows

F is able to open and keep a large number of file windows two of which are displayed side by side at a time and which are managed in so-called "rings" - meaning that they can be cycled through - via a window list and hotkeys. There are seperate rings for each side for the split-window display and for each file viewer and editor. New file windows can be opened for drives, relative to existing windows i.e., parent or subdirectories, or by specifying fully qualified paths on the command line. It is also possible to have a pre-defined set of file windows opened and make windows switch pane sides, for instance.

Fig. 1: Window list for ring maintenance

Each file window carries a large amount of information like the total size and number of files in a window, the size and number of selected files, the files' attributes and whether a file has extended attributes attached or not.

Fig. 2: Coloring by file types

File types are colored depending on their suffixes and types. These colors are adjustable via the configuration file. Files are not only colorable by type. F offers its own association mechanism which is similar to the association by extension mechanism of the WPS. This also includes the capability of having more than application associated with each extension and the possibility to choose the desired one for opening a file.

Fig. 3: Selection for opening a PDF file

All file windows provide incremental searching. This means that as you type in a file name, the display jumps to the first file whose beginning matches the entered characters. Alternatively, the incremental search can also be applied on the file extension or parts inside of the file name.

#### Command line

F's command line is different from others. First of all, it is available not only in file management mode but also for editor and viewer. You can enter commands which are provided by F internally, and any other external commands as well.

Inside the commands, macros can be used to access files which are listed in the currently displayed file windows - both active and inactive ones - or text in the viewer or editor. Different macros allow one to use only selected parts of a file's name and path. Moreover, with the help of these macros, the commands can be applied to the currently highlighted file - of both active and inactive windows - or the the currently selected files. It is even possible to decide whether a command is to be passed to files as arguments all at once or to be executed seperately for each file.

This concept is best illustrated by examples:

    unzip /m/k/ -d /o

would invoke Info-ZIP's Unzip to unzip all marked files in the active pane (addressed by `/`) to the directory which is highlighted in the inactive pane (addressed by `/o`). `/m` ensures that unzip is invoked seperately on each file and with `/k` F won't wait for a keystroke after each command.

    diff -ub / /o > H:\diffs\/f.diff

would compare the files which are currently highlighted in each pane via GNU diff and save the result to a file with the same name as the highlighted file in the active pane and a `.diff` extension to the directory `H:\diffs`.

This is a very powerful feature, especially in combination with other features of F: aliases, user commands and freely definable hotkeys. Aliases can be used to define new shorter names for complex commands; e.g., you could just use `diff` for the above example. Alternatively, you can add such commands to a list of user commands which can be invoked at any time. Finally, you could choose to define a hotkey to execute the command immediately on pressing the keys.

F maintains an extensive history of commands issued via its command line that is common to all components i.e., file managing mode, viewer, editor, etc. Besides the step-through history mode that is known from most command line interpreters and shells, the history is able to display a scrollable window with a list of previously issued commands. Like the file windows, this window provides an incremental search feature. As you type in a command character by character, the window automatically highlights the first command whose first characters match those you have entered so far. While using a different approach than the traditional command completion known from many shells, this feature basically does the same in a more flexible way.

Fig. 4: Command history

When F's own command line does not suit the purpose, it is also possible to start normal windowed OS/2 and fullscreen DOS sessions for the directory of the currently active pane, as well as have F extend the standard command interpreter's functionality by running it in the so-called concurrent process buffer. More about this interesting feature later.

There is one caveat. If program output has to be redirected to a file, using the built-in command line may produce unwanted results as both `STDOUT` and `STDERR` are captured and redirected to the same pipe. In the case of HTML Tidy both the cleaned HTML code and error and info messages would end up in the result file, for instance. This can be avoided by sending the command to the concurrent process buffer.

#### Clipboard

F comes with its own built-in clipboard. However, data can be transferred between the internal and the OS/2 system clipboard. The internal clipboard is restricted to text data, but has extended functionality compared to the standard OS/2 system clipboard in that data can be appended and that the clipboard is able to carry several entries.

### Components

Besides the file managing facilities, F includes a number of additional components, namely an internal file viewer and editor, virtual file systems (VFS), assorted Internet/network service clients, small Internet service servers, as well as a load of tools for system administrators (who might as well be home users) and developers.

#### File management

F supports all operations for file and directory manipulation that can be expected from a file manager like copying, moving, and deleting files and directory trees as well as renaming files and changing file attributes.

Much effort went into the search facilities. There are numerous ways to search files and directories, including comparison and search and replace operations. Results can be used to invoke the place of finding - usually the line - in the viewer or editor, to create a new file window or a file with all the files the search string was found in for further operations. Furthermore, complete directory trees can be synchronized.

The same applies to deciding which files operations are to be executed upon. In an existing file window, files can be marked individually, from the currently highlighted file to the top or bottom, and by certain criteria e.g., file masks, file attributes, and in comparison to files in the other pane. The current selection of files can be inverted. All these operations can be applied consecutively.

New file windows can be composed from existing ones or by file masks, size, date and time, and attributes. In addition, files can be excluded from display and more files can be added via the same mechanisms that new windows can be created with.

Let's clarify this with an illustrative task: Imagine that you have been working on a web page for the last week and you need to replace a special contact email address within all HTML files that reside in one subdirectory of your web project directory tree and have been changed during the last five days, and all PHP files that reside in another and that have been changed during the last three days with the new address you just got. With F, you could do the following:

1. Open the directory that contains the directory tree with the HTML files

2. Highlight the directory that contains the HTML directory tree

3. Change to the other pane

4. Change to the command line and issue

       dir -s -fdgD-5 /o*.html

   This creates a new file window with all HTML files in all subdirectories of the directory highlighted in the other pane.

5. Change back to the first pane

6. Highlight the directory that contains the PHP directory tree

7. Change to the other pane

8. Change to the command line and issue

       adir -s -fdgD-3 /o*.php

   This adds all PHP files in all subdirectories of the directory highlighted in the other pane to the file window with the HTML files.

9. Mark all files with `[Ctrl-Alt-+]`

10. Change to the command line and issue

        fchange /m/k/ "oldcontact@domain.com" "newcontact@domain.com"

Done.

Tasks that involve many or large files can be very time-consuming and block the user-interface while running. For most of those potentially lengthy operations, F offers a background execution mode. That means that you can continue editing in F while copying a large directory tree with many files. There are no status reports while the task is running but F notifies the user of the result after the operation is completed via its internal messaging system (see below).

It is possible to define file descriptions which F displays in the status bar when a file is highlighted. Besides its own mechanisms, F also supports third-party ones like 4OS2's descript.ion files.

##### Special OS/2 support

While F is available for several platforms, its OS/2 version supports several OS/2 specifics - many of which most OS/2-only file managers don't. The keyword that is common to most of them is extended attributes.

F is aware of the `.LONGNAME` extended attribute and honours it when transferring files between drives that are formatted with file systems that support long file names - including HPFS, JFS, and even FAT32 - and FAT drives. That means that F automatically creates `.LONGNAME` attributes when copying from e.g., HPFS to FAT, and also uses the names contained in `.LONGNAME` as file names when copying from FAT to HPFS or similar. In addition, F provides a set of means to handle EAs. This includes the possibility to display EAs, to save EAs to and restore them from a seperate file, as well as to set, delete, and modify such of type `ASCII`.

The file manager's own mechanisms for defining the aforementioned file descriptions include saving those in an EA. But also the content of the `.SUBJECT` attribute is displayed. This can come in quite handy in connection with tools like AutoWGet. When highlighting a file that was downloaded with AutoWGet, F immediately displays the URL it has been downloaded from.

Fig. 5: Display of .SUBJECT attribute in the status bar

OS/2 support also includes creating WPS program objects from executable files and the ability to read INF and HLP file titles upon highlighting of such a file and displaying them in the status bar. No more confusion by IBM's cryptic names.
Finally, it supports the Toronto Virtual File System (TVFS) in that it can detect where a file from a TVFS drive really is located.

#### File viewer and editor

The file viewer is designed for basic and fast browsing and searching of files, but also offers a few advanced features like syntax-highlighting for a limited number of file formats e.g., C, REXX, and HTML code, and parenthesis matching. The window can be split to compare different files or parts of the same file.

Fig. 6: Split editor window with active syntax-highlighting

The file editor on the other hand provides a far more complete set of features including that of the viewer. OS/2 users will find it interesting to note that F's internal editor is very similar to EPM in terms of behaviour and many commands. In contrary to the viewer, syntax-highlighting in the editor is configurable and extendable via a configuration file that employs regular expressions. Other advanced features are related to editing source code for the most part. They include support for bookmarks, ctags, and C syntax expansion.

Alternatively, files can be opened in an external viewer or editor.

#### Concurrent process buffer

The concurrent process buffers is basically the standard OS/2 command shell as defined by the `OS2_SHELL` statement in `CONFIG.SYS` that runs inside of F and is enhanced that way. It captures any program output to `STDOUT` and `STDERR` and keeps it in a buffer that is part of the built-in editor and thus offers many of its features. This means that you can e.g., scroll back through the output to the very beginning of the session (there is no limit as with standard OS/2 windows), search it and execute copy and paste commands.

Fig. 7: concurrent process buffer

Unlike F's command line, programs running in the buffer do not block F's user interface and it remains available for other tasks. The command line is able to "send" commands to the concurrent process buffer, though.

Besides `CMD.EXE` other command processors like 4OS2 should work, too. The buffer is only usable with programs which write their output to the standard `STDOUT` and `STDERR` devices. Programs that write directly to the screen, so-called VIO programs, cannot be run inside of the buffer. Also, some programs detect if the input/output stream has been redirected and act differently if that is the case.

#### Virtual file systems (VFS)

Basically, this features allows F to present content that is not present as a local file system as if it were. Virtual file systems are available for many archive formats like e.g., ZIP, TAR, RAR, WarpIN packages, and the IBM disk image format as well as for remote connections like FTP and NetBIOS shares - the latter meaning that NetBIOS shares don't have to be mounted as network drive via the LAN Requester, but can be accessed directly via their UNC names. This concept even works recursively e.g., for ZIP archives inside of ZIP archives.

The virtual file system can be browsed and virtual files can be manipulated to a certain extent that depends on the individual VFS. Manipulation means that files can be copied, moved, deleted, extracted, added, removed, renamed, and searched by using the standard operations and commands on and between F file windows. When the user chooses to edit a file that resides in a ZIP archive, for instance, F extracts the file to a temporary directory, opens it inside the editor, and automatically updates the ZIP archive when the file is saved and the user leaves the editor.

Fig. 8: ZIP archive content

The archive VFS's weak spot is the representation of directory trees. Instead of displaying one directory with its content at a time and making the archive browsable like a normal file system, the whole archive content is displayed at once, each file with its complete path. This makes viewing and working with archives which contain deeply nested directory trees and/or long file names quite difficult since only a certain number of characters of the path's beginning are displayed in the file window. That means that if you search for a certain file you have to scroll through the window and watch the top of the display that always displays the full qualified path name of the currently selected file. Thankfully, F sorts the VFS window by the file names excluding the path, so there is at least some way to speed up the search.

#### Internet/network service clients

F includes standard Internet service clients for FTP, email, and news and ones for its own F-to-F protocol (FFP) and instant messaging system as well.

##### FTP

Besides the basic functionality of transferring, renaming, and deleting, F provides a number of advanced features for FTP. Connections can be established to up to 36 FTP servers, with multiple file windows for each connection. The client can connect via PORT or passive FTP, and it is possible to use non-standard ports. F supports FXP operations, which means that files can be transferred between remote FTP servers without having to transfer the data to the local machine first.
Resume mode i.e., continuing a previously interrupted transfer operation, is supported for downloads of single files. If more than one file is transferred, existing files will be overwritten. In addition, transfer and delete operations can be executed for complete directory trees. F is also capable of changing permissions for remote files.

Remote files can be viewed and edited. F downloads the file and opens it in the corresponding component. If the file is closed and was edited, F uploads the result to the server. Transfers may be executed in the background. For that purpose, F creates a command file and then calls the standard `FTP.EXE` command.

F doesn't have any bookmark functionality to store information of regularly visited servers for easy access, but this can be partially compensated for by defining user commands or aliases in the F configuration file. Unfortunately, the file and directory update feature is not available for FTP connections. This would have made maintaining web sites or synchronizing mirrors a lot easier, for instance.

##### FFP

The FFP client works very similar to the FTP client. The main difference is that there always has to be either an instance of F running on both ends of the connection, the remote one acting as a server (see Internet/network service servers section), or F on the local machine and an FFP server on the remote host. Hence the name F-to-F Protocol. FFP provides a kind of superset of FTP features. Transfer speed is said to be faster, and data can be sent compressed. Most file operations for the local file system are also available, and progress is displayed in the status bar for foreground operations. File operations can be executed in the background. Transfers operations are also possible between different FFP sessions as well as FFP and FTP sessions.

Furthermore, there is special support for ZIP archives. To access their content, they don't have to be downloaded first. Only the required data is sent compressed and then extracted by the local client. Files that reside in remote ZIP files can be edited, and the remote ZIP archive is updated automatically afterwards. Moreover, remote ZIP archives can be created from remote files and directories.

Finally, FFP provides remote execution capabilities. This makes F a nice replacement for a FTP/Telnet combination and suited for remote administration.

Fig. 9: File window for FFP connection with display of EA of a remote file

##### Email and news

The Email and news clients provide only basic functionality. While they do support multiple servers and the built-in editor has syntax-highlighting and MIME and Quoted-printable (de)coding facilities, both parts don't have any sort or filter capabilities to e.g. sort messages into folders, killfile news posters, or show news posts in threads. Also, composing new and replying to messages requires some hand-editing of headers.

##### Messaging

The built-in instant messaging system is mainly used by F to inform the user about finished background operations and other events but can also be used to send short messages to other F users. The maximum message size is 32 lines with 256 characters per line. Messages can be sent to one or more users who have to have F running to receive the message. It is possible to have the receiving F send a confirmation when its user opens the message.

Fig. 10: FFP login report

Besides short text messages, also files of arbitrary content can be sent. This mechanism uses FFP and is not dependant on the addressee being online at the time the command is executed. Instead, F will wait until the addresse goes online again and then transfer the file.

##### Internet/network service servers

F includes FFP and simple FTP and HTTP servers. The FTP server's feature set is similar to that of the standard OS/2 FTPD. Setup of access privileges for the FTP and FFP servers employs the standard trusers file of OS/2's FTPD, which stores unencrypted user ID and password information. In addition, privileges for program execution can be specified for each remote FFP user.

The web server supports aliases for mapping paths into the standard document tree, 4OS2-style `descript.ion` files for automatic generation of directory listings, and a few special SSI commands. Directories can be protected on simple username/password basis. MIME types are configurable. There is also some support for Perl and PHP CGI but I never managed to get it running.

All servers report logins via F's internal messaging system and can log operations.

##### Other

Developers and hackers will find the binary editor useful. Loaded files are displayed in both hexadecimal and text format, and the text display can be switched between ASCII and EBCDIC encoding. Search and edit operations are available in both parts of the display. The search facility has no replace option. Replacing is a dangerous business in binary files but can come in handy.

Fig. 11: Hex editor with OS/2 kernel

Duplicate checkers can search the paths of any `CONFIG.SYS` statements for files with the same name and help to avoid version conflicts that way. Environment variables can be checked for invalid paths.

F includes a process list and kill feature. Moreover, it is able to detect if a DLL file is currently loaded and by which processes it is used as well as show a list of open files and the process that opened them. Open and locked files can be unlocked for easier replacement. F can examine executables and DLLs for required DLLs and check whether these are accessable. Note that this only checks for availability in the `LIBPATH` but not for entry points.

Other features include a simple calendar without PIM functionality, a phone book which actually is more of a general purpose notes file, several format converters, basic math calculation, and an audio CD player.

### Appraisal

F combines the strengths of an enhanced file manager interface with the flexibility of a command line to something that is more than the sum of its parts. There is not just the benefit of being able to use the part that fits the situation most. Instead, the macro interface between the two provides a greatly enhanced concept that is extremely powerful.

The approach used for the user-interface doesn't exactly make F a model of new-user-friendliness and the initial learning-curve is steeper than elsewhere. However, the extensive online help and FAQ provide good and detailed information with many examples on usage. Once you learn to master the interface, you will appreciate its flexibility.

F is a very stable application. I have been using F for several years now and have hardly experienced any crashes or bugs.

Performance is generally good, and excellent for the file manager part, especially when logging is turned off. F is one of the two fastest file managers that are available for OS/2, the other being Brian Havard's File Commander/2. Being able to continue work while a large file operation runs in the background is also of great advantage. Syntax-highlighting can really slow down the editor. I created a highlighting scheme for `CONFIG.SYS` with rules for every kind of statement and it caused a huge performance hit. An extended highlighting scheme for HTML files worked fine, though. It is better not to highlight too much.

The editor provides a good set of advanced editing features, albeit being far from that of full-grown editors like Emacs or jEdit, of course. Syntax-highlighting is definitely a good thing to have. There is no support for command completion other than for the C language, folding, code-checking, spell-checking, or pretty-printing - in short, things you need for large projects. But then a file manager editor is not intended to be used for that. For most every-day jobs the built-in editor is more than well equipped.

The concurrent process buffer is something many users have been waiting for. Being able to scroll back through the output almost indefinitely has not been available before and here it is even editable. The editor features also come in very handy when working in a development environment, for instance. If a compiler is run inside of the buffer and reports an error message, it is possible to directly jump to the erroneous file or line.

Virtual file systems are an essential feature. The missing directory navigation can make archives difficult to handle though. This limitation can partially be overcome with the incremental search feature. I suggested changing this to the developers a while ago but it would need considerable effort and has low priority. Unfortunately, some of the VFS show that development of F has been on the back burner for a while. The RAR VFS does not handle some archives that have been created with the latest RAR versions. It would also be nice if the WarpIN VFS was able to handle executable WarpIN packages.

The FFP functionality is a great help for system administrators. It sure beats FTP and Telnet. Security may be an issue but then the FFP is not widely used.

Email and news clients are very limited. Nethertheless, they provide a good quick and dirty solution for text-mode only systems, if only small amounts of messages have to be dealt with, or for rescue systems.

The built-in FTP and HTTP servers are not suited for heavy-duty tasks such as running large software archives or web sites with heavy traffic as they lack the required functionality, configurability, and security features. If you are looking for easily to setup solutions with not so strict security requirements for, e.g., a file archive with low traffic, an aid for web development on your local machine, or making local copies of HTML documention available in a smaller company network, the built-in servers provide a good alternative.

The assorted collection of integrated tools is a real time-saver. No need to install and setup package after package; just start F and you are ready to go.

There are a few bugs and glitches. First of all, when in the editor, the incremental search sometimes stops working the normal way and can only used backwards until F is restarted. This is quite annoying, although it may also be a case of PEBKAC (Problem Exists Between Keyboard And Chair).
The following is definitely a bug: When you are inside of a directory whose name contains spaces and you enter a subdirectory and go back again, F does not display files anymore, only directories. This stays that way until you enter a directory above the one with the spaces. Finally, F cannot copy to the root directory of FAT32 drives if the single file copy operation is used. Copying via "copy marked files" works without problems. This may actually be a bug in the FAT32 driver.

### Conclusion

F is one of the best file managers available for OS/2 and other operating systems alike. It is very powerful, very fast, and laden with all kinds of handy features. Plus you can't beat the price. The interface takes getting used to, though. Users who have more basic file management needs may want to consider using something leaner like File Commander/2. Those who prefer PM programs probably want to use File Manager/2 or FileStar/2 instead. For power-users, administrators, and developers I can heartily recommend F. My own job involves a lot of system maintenance and administration work, and I wouldn't want to miss F.

References: F 4.75 beta Developer: Duy Nguyen, Michel Normand Price: Freeware F homepage: http://filemanager.free.fr

Feature Index
editor@os2voice.org
< Previous Page | Newsletter Index | Next Page >
VOICE Home Page: http://www.os2voice.org