home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
fixtitle.zip
/
fixtitle.doc
< prev
Wrap
Text File
|
1995-01-11
|
5KB
|
121 lines
FIXTITLE A utility to reconcile OS/2 file names and titles
M. H. Prager January, 1995
************************************************************************
WARNING -- READ THIS BEFORE USING FIXTITLE
The program FIXTITLE is provided free of charge, AS IS, and with NO
WARRANTY OF ANY KIND. The program has been used successfully under OS/2
2.1 and OS/2 Warp 3.0, but the author accepts NO RESPONSIBILITY for
consequences of the use of this program, whether used in accordance with
instructions or not. It is possible to cause SERIOUS SYSTEM DAMAGE if
FIXTITLE is used to rename OS/2 system files or files stored by certain
backup programs. DO NOT USE FIXTITLE UNLESS YOU ACCEPT THESE CONDITIONS.
************************************************************************
Introduction
------------
FIXTITLE is a REXX program to address a peculiar bug in IBM's OS/2
operating system. To explain FIXTITLE, it is necessary to explain a bit
about OS/2's filesystems. The explanation that follows is derived from
my observations about how OS/2 works, and I may have missed some
subtleties; however, it is correct for the present purpose.
In OS/2 (unlike DOS), all files can have two names: the physical file
name ("filename") and the longname extended attribute ("longname"). This
allows files on FAT volumes to be displayed with long names by the WPS,
but it can cause confusion when the two names are different. EVERY file
has a filename, but not every file has a longname.
When a directory (synonymous with "folder") is displayed in OS/2's
workplace shell, the title displayed under the icon is the longname if
one exists; otherwise, the filename is displayed. If the icon title is
edited by the user, and the file is on an HPFS volume, the new name is
stored as BOTH longname and filename. This is true on a FAT volume if
the new name meets the 8.3 requirement; if not, a contracted version is
used for the filename.
In contrast, when files are renamed through the command line, OS/2
changes ONLY the filename, and NOT the longname. This doesn't matter if
the file has no longname; but if the filename has ever been changed
through the WPS, the file WILL have a longname. As a result, the same
file could be called "Bill" as part of a DIR listing and "Newt" when
viewed as an icon. For users who use both the command line and the WPS
to manage files, this situation is intolerable.
FIXTITLE to the Rescue
----------------------
FIXTITLE is a command-line utility that lets the user identify files
with longnames different from their filenames and and optionally change
the longnames to match the filenames. To use FIXTITLE, you must have
installed Rexx when you installed OS/2.
To install FIXTITLE, copy FIXTITLE.CMD to a directory on your OS/2 PATH.
FIXTITLE can then be invoked with the following syntax:
fixtitle [filename] [-[option...]]
where the available options are:
H or ? Prints a short help message
S Processes all subdirectories
N Doesn't rename - just lists files with nonmatching titles
Examples
--------
fixtitle * -s
will process all files in all subdirectories of the present directory. That
means that it will print out each file with unmatched names and ask if you
want to match the longname to the filename.
fixtitle -ns
will list all files with unmatched names in all subdirectories of the
present directory.
Notes
-----
1. FIXTITLE never changes a longname without your permission. This is
done for reasons of safety. Those familiar with REXX can modify the
source to add an unprompted option, but this is NOT RECOMMENDED.
2. FIXTITLE changes the longname immediately, but for some reason,
the WPS does not display the new name immediately. It seems to require
either opening the Settings Notebook for the file or rebooting OS/2
to display the new name.
3. You can cause SERIOUS DAMAGE to your OS/2 installation by telling
FIXTITLE to rename OS/2 system files. Don't do it!
4. The options are not case-sensitive. The default filename is '*'.
5. Because the command line does not change the longname directly, and
the WPS changes BOTH longname and filename, FIXTITLE always modifies the
longname to match the filename. (If you want to change the filename, you
can do so directly from the command line or from the WPS). FIXTITLE is
most useful after you have renamed files from the command line, to make
sure you will see the new filenames when viewing the directory with the WPS.
6. I will endeavor to make corrections to FIXTITLE if you let me know of
any problems. You can contact me at the following addresses:
Compuserve: 72050,3220
Internet: 72050.3220@compuserve.com
Please also let me know if you like the program.
Mike Prager
January 11, 1995