home *** CD-ROM | disk | FTP | other *** search
/ hobbes.nmsu.edu / 2008-06-02_hobbes.nmsu.edu.zip / dos / sfrename.zip / SFRENAME.DOC < prev    next >
Text File  |  1993-11-09  |  4KB  |  82 lines

  1. Sfrename - rename OS/2 special files and set attributes
  2. Copyright Oct. 2, 1993 by Robert W. Babcock and WSS Division of DDC
  3.  
  4.                               Why rename?
  5.  
  6. OS/2 users may find it convenient or necessary to boot DOS to backup or
  7. defragment their FAT-format hard disks.  Some tape drives do not work under
  8. OS/2, and you wouldn't want to defragment the disk which OS/2 was booted from
  9. even if OS/2 allowed you to do so because it has open files on it.
  10.  
  11. On a FAT disk, OS/2 creates two files with "funny" names: "EA DATA. SF" and
  12. "WP ROOT. SF".  The first of these has read-only, hidden and system
  13. attributes, the second hidden and system.  DOS backup and disk defragmenting
  14. programs may choke on the embedded blanks in these names, or may ignore them
  15. because of the attributes.  On alternate executions, sfrename changes the
  16. blanks in these names to underscores and gives the files normal attributes
  17. then changes the underscores back to blanks and restores the usual
  18. attributes.  So, you can boot DOS, add underscores to the names of the
  19. special files, backup or defragment, remove the underscores and return to
  20. OS/2.  Note that all of these functions except putting the blanks back in
  21. the file names can be performed using DOS commands and wildcards.
  22.  
  23.                                    Usage
  24.  
  25. Sfrename is a DOS program.  You must boot DOS to use it because OS/2 won't
  26. let you rename its special files.  Just switch to the appropriate disk and
  27. type SFRENAME to run the program, it takes no arguments.  It looks at the
  28. files in the root directory of the current drive to decide which way to do
  29. the renaming. It also checks that one of the two expected combinations of
  30. files exists, and does nothing if files are missing or extra files are
  31. present.
  32.  
  33. One other thing you might want to do before starting a backup or defragging
  34. is to delete SWAPPER.DAT.  OS/2 will recreate this file, and it does not hold
  35. any useful information across reboots.  Backing it up or defragmenting it
  36. would be a waste of time.  Return to OS/2 promptly after defragging so that
  37. contiguous disk space is available for the recreated SWAPPER.DAT.
  38.  
  39.                       Defragmenting considerations
  40.  
  41. EA DATA. SF holds "extended attributes" for files.  I have seen claims that
  42. OS/2 attempts to put the fragments of EA DATA. SF near the associated files,
  43. so defragmenting it may harm rather improve performance.  On the other hand,
  44. defragmenting files may move them far away from their original position, so
  45. this argument is suspect.  In any case, defragmenting EA DATA. SF does not
  46. seem to break anything.  Another claim, which I do believe, is that since
  47. OS/2 uses previously unused fields in the directory to store pointers to
  48. entries in EA DATA. SF, a defragmenting program which seems fine under DOS
  49. could fail to preserve these fields and thus effectively destroy the extended
  50. attributes irregardless of whether EA DATA. SF is moved.  Supposedly, very
  51. old versions of Norton Speeddisk suffer from this problem, but modern
  52. versions are ok, as are most other defragmenters.  Unfortunately, I don't
  53. know of any safe way of testing whether a defragmenter is safe.
  54.  
  55.                          Other hidden OS/2 files
  56.  
  57. OS/2 creates several other hidden files in the root directory of a FAT boot
  58. drive.  Sfrename does not do anything with these because I fear that the
  59. names and number of files may change with future OS/2 releases.  If
  60. necessary, the DOS attrib command can be used to make these files visible.
  61.  
  62.                                  License
  63.  
  64. You are granted an unlimited license to use Sfrename on any number of
  65. computers.  You may modify the included Borland C 3.1 source code, but if you
  66. distribute a modified version, you must modify the opening banner to display
  67. both my original copyright and a message indicating that you have made
  68. changes.  Sfrename is made available without charge, and without any
  69. warranty.  BBS operators, online services and networked file archive sites
  70. may make it available for download.  Public domain/shareware copying services
  71. vendors may distribute Sfrename on floppy or CD-ROM disks or other media.
  72.  
  73. Robert W. Babcock
  74. WSS Division of DDC
  75. 4 Reeves Road
  76. Bedford, MA  01730
  77. 617-275-1183
  78. Internet: babcock@cfa.harvard.edu
  79.        or rbabcock@bix.com
  80. WSS/DDC tech support BBS: 617-275-5834  14,400 baud, v.32bis, 24 hours
  81.                           Home of Wssindex disk cataloger
  82.