home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / DISK_UTL / SM200.ZIP / SM.DOC < prev   
Text File  |  1992-01-13  |  27KB  |  581 lines

  1.                   Space Map
  2.               Disk Space Mapping Program
  3.                  Version 2.0
  4.  
  5.  
  6.                   Ben Smith
  7.                110 S. Gardenia
  8.               Celeste, TX  75423
  9.  
  10. SCENARIO 1:  You're a network administrator.  One morning, to your
  11. horror, you discover that one of your users has eaten all but 500K of
  12. the space on the system volume!  Quick, which user is the culprit?
  13.  
  14. SCENARIO 2:  You're installing that new Windows application that takes
  15. only about fifteen meg of disk.  You have six.    Quick, which directory
  16. can you zap and free up enough space?
  17.  
  18. SCENARIO 3:  You're about to do a backup, and would like list of
  19. EVERY file on your disk to compare to your backup copy should the
  20. worst happen. Quick, how do you get it?
  21.  
  22. With SPACE MAP, it's easy!  Space Map is the utility you need to
  23. answer simple questions like:
  24.  
  25.   How big is that application, with all its directories?
  26.  
  27.   What can I clean off my disk to free up space?
  28.  
  29.   Hey!    Where'd all my disk go?!
  30.  
  31. BUT WHY?  Because no utility I use could do this!  I own Lotus
  32. Magellan, PC Tools 7.1 and several other general purpose utility
  33. packages...NONE of them could tell me how much space was in use in a
  34. single directory and all of its child directories!  Even the several
  35. dozen shareware offerings couldn't do this simple chore (although I'd
  36. be happy to hear from anyone who knows of a product that does this).
  37.  
  38. DISTRIBUTION:  Space Map is being distributed as freeware.  You are
  39. free to use Space Map on as many computers as you like, for as long as
  40. you like.  You may give copies away to friends, customers, business
  41. associates, or anyone else.  If you are a shareware distributor, you
  42. may include Space Map in your collection, so long as your disks sell
  43. for less than $5.00 each, and you make it clear to your customers
  44. that they are buying the physical diskette, and that the program
  45. itself is free.
  46.  
  47. You may not, however, sell the Space Map program itself.  The program,
  48. this document file, and any other files which may be distributed in
  49. the Space Map archive file are copyrighted material (c) 1991 Ben
  50. Smith.    Permission to copy is granted so long as the above conditions
  51. are met.
  52.  
  53. DISCLAIMER:  While I have taken every reasonable precaution to ensure
  54. that Space Map is safe and effective when used as directed, because of
  55. the diversity of software and hardware in common use I cannot be
  56. responsible for any actual or consequential damages caused by this
  57. program to your computer or the data stored in it.  You use this
  58. program strictly at your own risk.  By running the program, you
  59. indicate your assent to this limitation of liability.
  60.  
  61. DIFFERENCES - Version 1.0 to Version 2.0
  62.  
  63. *  The visual display has been cleaned up significantly.  The display
  64.    now shows information in columns with an attractive double line
  65.    border.
  66.  
  67. *  Added sorting - Sort each directory level by file/directory name,
  68.    size, or time and date.
  69.  
  70. *  You can now include file/directory size, date, time, number of
  71.    files/directories, and attribute information in the display.
  72.  
  73. *  If you have ANSI.SYS loaded, you can have the display presented in a
  74.    "green bar" format.
  75.  
  76. *  You can have the program pause after each screenfull.
  77.  
  78. WHAT'S IN THE ARCHIVE?
  79.  
  80. The archive (or disk, if you obtained the program from a shareware
  81. distributor) contains the following files:
  82.  
  83.      SM.COM    The Space Map program
  84.      SM.DOC    The documentation file you're reading now
  85.      READ.ME   Last minute notes, release updates
  86.  
  87. HOW TO USE IT:    Copy the SM.COM file to some directory on your PATH
  88. (if you're not sure what a PATH is, ask someone).  On my computer, I
  89. have a UTIL directory that includes all of my one-program utilities
  90. (like LIST and PKZIP).    The syntax of the command to invoke Space Map
  91. is:
  92.  
  93.      SM [pathname] [options]
  94.  
  95. All parameters to the SM command are optional.    When the program is
  96. invoked, it will always descend through EVERY subdirectory under
  97. [pathname].  As it goes, it will add up the sizes of all of the files
  98. it finds.  As it backs out of each directory, it can display the total
  99. of the sizes of all files in the directories it's found along the way.
  100.  
  101. These parameters are used to tell Space Map how to display the
  102. results:
  103.  
  104. *   /Dnn - Display nn levels of directory depth
  105.  
  106.     Use this option to limit the amount of information displayed by
  107.     Space Map.    SM can generate a tremendous amount of information, most
  108.     of it inconsequential.  By using this option only those directories
  109.     (and files, if specified) no more than nn levels above the base
  110.     directory path specified will be displayed (although all directories
  111.     will still be scanned).  /D1 means that only those files and
  112.     directories immediately below the specified path will be displayed;
  113.     /D0 means to print only one summary line and no detail lines.
  114.  
  115. *   /I[s|l|a|t|d|f|n] - Include information
  116.  
  117.     Use the /I option to tell Space Map what information you want
  118.     displayed about each file or directory which is displayed.    The
  119.     parameter characters have the following meaning:
  120.  
  121.     s - Display the DOS size of the file, or of the total files in each
  122.     directory.
  123.  
  124.     l - Display the amount of storage allocated to the file, or to all
  125.     of the files in a directory.
  126.  
  127.     a - Show the attributes (hidden, system, read-only, and archive)
  128.     associated with a file or a directory.
  129.  
  130.     t - Display the last modification time of the file or directory.
  131.  
  132.     d - Display the last modification date of the file or directory.
  133.  
  134.     f - Display the number of files contained in the directory.
  135.  
  136.     n - Display the number of subdirectories contained in the directory.
  137.  
  138. *   /X[s|l|a|t|d|f|n] - Exclude information
  139.  
  140.     This is the opposite side of the /I option.  It causes Space Map to
  141.     exclude the specified information column from the display.
  142.  
  143. *   /F - Display files as well as subdirectories.
  144.  
  145.     Space map normally just summarizes the totals in each subdirectory
  146.     it encounters.  /F causes Space Map to display every file it
  147.     encounters.
  148.  
  149. *   /S[+|-] [s|a|d|n] - Sort display
  150.  
  151.     Sorts the display in ascending or descending order on the specified
  152.     key.  Note that each subdirectory level is seperately sorted; no
  153.     sort option can override the basic order imposed by the tree
  154.     structure imposed by DOS.  You can sort on any of the following
  155.     keys:
  156.  
  157.     s - DOS File size, or the total DOS size of all files in all
  158.     subdirectories.
  159.  
  160.     a - Allocated file size, or the total allocated space given to all
  161.     files in all subdirectories.
  162.  
  163.     d - Creation/last modification time and date.
  164.  
  165.     n - File or subdirectory name
  166.  
  167.     You can control the sort order by specifying '+' to sort in
  168.     ascending order (the default), or '-' to sort in descending order.
  169.  
  170. *   /C[+|-] - Control ANSI color display
  171.  
  172.     Normally, Space Map displays its information in a monochrome format,
  173.     suitable for redirection to a disk file or printer.  Enabling this
  174.     switch (using /C+) causes Space Map to change the background color
  175.     of each group of three lines, causing a "green bar paper" effect on
  176.     the screen.  ANSI.SYS must be loaded for this function to operate
  177.     properly, and if the output is redirected, the ANSI escape functions
  178.     will be sent to the redirected device.
  179.  
  180. The same information can be obtained by typing SM/H or SM/?.  You will
  181. then see the following summary screen:
  182.  
  183. ╔══════════════════════════════════════════════════════════════╗
  184. ║  Space Map         Version 2.0                   ║
  185. ║  Copyright (c) 1991,1992 Ben Smith                   ║
  186. ║                                   ║
  187. ║  Usage:  SM [directory-spec] [options]               ║
  188. ║       Valid options:                       ║
  189. ║       /F - display (F)iles in each directory           ║
  190. ║       /I[s|l|a|t|d|f|n] - (I)nclude file information:     ║
  191. ║           s - file (S)ize                       ║
  192. ║           l - a(L)located size                   ║
  193. ║           a - (A)ttributes                    ║
  194. ║           t - creation/modification (T)ime            ║
  195. ║           d - creation/modification (D)ate            ║
  196. ║           f - count of (F)iles                   ║
  197. ║           n - cou(N)t of directories               ║
  198. ║       /X[s|l|a|t|d|f|n] - e(X)clude file information      ║
  199. ║       /Ss|a|d|n[+|-] - Sort report:               ║
  200. ║           s - sort on accumulated file (S)ize           ║
  201. ║           a - sort on accumulated (A)llocation           ║
  202. ║           d - sort on creation/modification (D)ate/time   ║
  203. ║           n - sort on file (N)ame                   ║
  204. ║           + - Perform ascending sort               ║
  205. ║           - - Perform descending sort               ║
  206. ║       /C[+|-] - Enable/disable ANSI color display           ║
  207. ║       /Dnn - Display only nn levels of directory depth    ║
  208. ║       /P - Pause for key after each display page           ║
  209. ║       /? or /H - Display this help text               ║
  210. ╚══════════════════════════════════════════════════════════════╝
  211.  
  212. USING THE OPTIONS:  SM, run without options, will provide a display
  213. which resembles this:
  214.  
  215. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  216. ╔══════════════════════╤═══════════╤═══════════╗
  217. ║ Tree                 │   Size    │   Alloc   ║
  218. ╟──────────────────────┼───────────┼───────────╢
  219. ║ C:\TEMP              │   380,939 │   454,656 ║
  220. ║ ├─OVERVIEW           │   767,171 │   774,144 ║
  221. ║ │ ├─EMPTY            │         0 │         0 ║
  222. ║ │ ├─NONEMPTY         │    63,275 │    65,536 ║
  223. ║ ├─OVERVIEW           │   830,446 │   839,680 ║
  224. ║ ├─EMPTY              │         0 │         0 ║
  225. ║ │ ├─NOTRLY           │         0 │         0 ║
  226. ║ ├─EMPTY              │         0 │         0 ║
  227. ║ ├─ARCHIVE            │    26,599 │    28,672 ║
  228. ║ ├─NEW                │     1,353 │     4,096 ║
  229. ║ C:\TEMP              │ 1,239,337 │ 1,327,104 ║
  230. ╚══════════════════════╧═══════════╧═══════════╝
  231.  
  232. The top line of the tree display gives the complete pathname of the
  233. subdirectory being mapped.  The columns "Size" and "Alloc" show the
  234. actual DOS-reported size and the space which DOS allocates to the files,
  235. respectively.  For information on the difference between DOS-reported
  236. size and allocated size, see Technical Information, below.
  237.  
  238. The next row (pertaining to the OVERVIEW subdirectory) shows the storage
  239. belonging to the files immediately within the OVERVIEW directory.  Note
  240. that after the next two directories (the EMPTY and the NONEMPTY
  241. directories), OVERVIEW appears again -- this time, reporting the
  242. cumulative total of the sizes of ALL files in all child directories.
  243.  
  244. INCLUDING/EXCLUDING INFORMATION:
  245.  
  246. You can, if you wish, include additional information about the
  247. directories you display.  For instance, you could include directory
  248. creation time and date in the above display by typing SM/IDT:
  249.  
  250. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  251. ╔══════════════════════╤═══════════╤═══════════╤══════════╤══════════╗
  252. ║ Tree                 │   Size    │   Alloc   │   Date   │   Time   ║
  253. ╟──────────────────────┼───────────┼───────────┼──────────┼──────────╢
  254. ║ C:\TEMP              │   381,740 │   458,752 │ 91/12/16 │ 16:02:06 ║
  255. ║ ├─OVERVIEW           │   767,171 │   774,144 │ 91/12/18 │ 13:58:42 ║
  256. ║ │ ├─EMPTY            │         0 │         0 │ 91/12/18 │ 17:43:50 ║
  257. ║ │ ├─NONEMPTY         │    63,275 │    65,536 │ 91/12/19 │ 13:10:00 ║
  258. ║ ├─OVERVIEW           │   830,446 │   839,680 │ 91/12/18 │ 13:58:42 ║
  259. ║ ├─EMPTY              │         0 │         0 │ 91/12/18 │ 17:43:28 ║
  260. ║ │ ├─NOTRLY           │         0 │         0 │ 91/12/19 │ 15:45:52 ║
  261. ║ ├─EMPTY              │         0 │         0 │ 91/12/18 │ 17:43:28 ║
  262. ║ ├─ARCHIVE            │    26,599 │    28,672 │ 91/12/27 │ 10:05:00 ║
  263. ║ ├─NEW                │     1,353 │     4,096 │ 92/01/09 │ 15:12:38 ║
  264. ║ C:\TEMP              │ 1,240,138 │ 1,331,200 │ 91/12/16 │ 16:02:06 ║
  265. ╚══════════════════════╧═══════════╧═══════════╧══════════╧══════════╝
  266.  
  267. On the other hand, if you don't need the allocated size portion of the
  268. display, you can type SM/XL (meaning Space Map/eXclude aLlocated):
  269.  
  270. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  271. ╔══════════════════════╤═══════════╗
  272. ║ Tree                 │   Size    ║
  273. ╟──────────────────────┼───────────╢
  274. ║ C:\TEMP              │   385,262 ║
  275. ║ ├─OVERVIEW           │   767,171 ║
  276. ║ │ ├─EMPTY            │         0 ║
  277. ║ │ ├─NONEMPTY         │    63,275 ║
  278. ║ ├─OVERVIEW           │   830,446 ║
  279. ║ ├─EMPTY              │         0 ║
  280. ║ │ ├─NOTRLY           │         0 ║
  281. ║ ├─EMPTY              │         0 ║
  282. ║ ├─ARCHIVE            │    26,599 ║
  283. ║ ├─NEW                │     1,353 ║
  284. ║ C:\TEMP              │ 1,243,660 ║
  285. ╚══════════════════════╧═══════════╝
  286.  
  287. The /I and /X options can be included in the SMAP environment variable,
  288. if you wish.  Options specified on the command line override options set
  289. in the environment variable.  See below, The Environment, for more
  290. information.
  291.  
  292. You can display information on individual files by including the /F
  293. option.  For example, to see information on the files in the OVERVIEW
  294. directory, you'd type SM OVERVIEW /F, and see the following display:
  295.  
  296. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  297. ╔════════════════════╤═════════╤═════════╗
  298. ║ Tree               │  Size   │  Alloc  ║
  299. ╟────────────────────┼─────────┼─────────╢
  300. ║ C:\TEMP\OVERVIEW   │ 767,171 │ 774,144 ║
  301. ║ ├─buzz.bat         │     248 │   4,096 ║
  302. ║ ├─overiew.exe      │  63,275 │  65,536 ║
  303. ║ ├─testbed.exe      │ 703,648 │ 704,512 ║
  304. ║ ├─EMPTY            │       0 │       0 ║
  305. ║ ├─NONEMPTY         │  63,275 │  65,536 ║
  306. ║ │ ├─testbed.exe    │  63,275 │  65,536 ║
  307. ║ ├─NONEMPTY         │  63,275 │  65,536 ║
  308. ║ C:\TEMP\OVERVIEW   │ 830,446 │ 839,680 ║
  309. ╚════════════════════╧═════════╧═════════╝
  310.  
  311. Notice that file names are displayed in lower case, while directories
  312. are displayed in upper case.
  313.  
  314. Finally, you can restrict the depth to which Space Map will "dig" into
  315. directories.  Of course, SM will always keep track of every file and
  316. subdirectory, but you may not want to actually see all that information.
  317. You can restrict the depth that SM will display by using the /D option.
  318. For instance, typing SM /D1 in this directory will display:
  319.  
  320. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  321. ╔══════════════════════╤═══════════╤═══════════╗
  322. ║ Tree                 │   Size    │   Alloc   ║
  323. ╟──────────────────────┼───────────┼───────────╢
  324. ║ C:\TEMP              │   390,573 │   479,232 ║
  325. ║ ├─OVERVIEW           │   830,446 │   839,680 ║
  326. ║ ├─EMPTY              │         0 │         0 ║
  327. ║ ├─ARCHIVE            │    26,599 │    28,672 ║
  328. ║ ├─NEW                │     1,353 │     4,096 ║
  329. ║ C:\TEMP              │ 1,248,971 │ 1,351,680 ║
  330. ╚══════════════════════╧═══════════╧═══════════╝
  331.  
  332. SORTING:
  333.  
  334. Space Map version 2.0 now provides sorting options.  Normally the
  335. unsorted display will show directories in the order DOS presents them.
  336. If you are viewing files, all files will be displayed before any
  337. subdirectory.  When you sort, all directories OF A GIVEN LEVEL are
  338. sorted exactly in the given order.
  339.  
  340. As an example, here is our test directory again:
  341.  
  342. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  343. ╔══════════════════════╤═══════════╤═══════════╗
  344. ║ Tree                 │   Size    │   Alloc   ║
  345. ╟──────────────────────┼───────────┼───────────╢
  346. ║ C:\TEMP              │   380,939 │   454,656 ║
  347. ║ ├─OVERVIEW           │   767,171 │   774,144 ║
  348. ║ │ ├─EMPTY            │         0 │         0 ║
  349. ║ │ ├─NONEMPTY         │    63,275 │    65,536 ║
  350. ║ ├─OVERVIEW           │   830,446 │   839,680 ║
  351. ║ ├─EMPTY              │         0 │         0 ║
  352. ║ │ ├─NOTRLY           │         0 │         0 ║
  353. ║ ├─EMPTY              │         0 │         0 ║
  354. ║ ├─ARCHIVE            │    26,599 │    28,672 ║
  355. ║ ├─NEW                │     1,353 │     4,096 ║
  356. ║ C:\TEMP              │ 1,239,337 │ 1,327,104 ║
  357. ╚══════════════════════╧═══════════╧═══════════╝
  358.  
  359. Now, we'll sort it by size by typing SM /SS:
  360.  
  361. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  362. ╔══════════════════════╤═══════════╤═══════════╗
  363. ║ Tree                 │   Size    │   Alloc   ║
  364. ╟──────────────────────┼───────────┼───────────╢
  365. ║ C:\TEMP              │   391,124 │   483,328 ║
  366. ║ ├─EMPTY              │         0 │         0 ║
  367. ║ │ ├─NOTRLY           │         0 │         0 ║
  368. ║ ├─EMPTY              │         0 │         0 ║
  369. ║ ├─NEW                │     1,353 │     4,096 ║
  370. ║ ├─ARCHIVE            │    26,599 │    28,672 ║
  371. ║ ├─OVERVIEW           │   767,171 │   774,144 ║
  372. ║ │ ├─EMPTY            │         0 │         0 ║
  373. ║ │ ├─NONEMPTY         │    63,275 │    65,536 ║
  374. ║ ├─OVERVIEW           │   830,446 │   839,680 ║
  375. ║ C:\TEMP              │ 1,249,522 │ 1,355,776 ║
  376. ╚══════════════════════╧═══════════╧═══════════╝
  377.  
  378. Of the subdirectories of TEMP, EMPTY is the smallest with zero bytes.
  379. NEW comes next, then ARCHIVE, and finally, OVERVIEW is the largest, with
  380. over 800K.  To invert the sort order, just include a minus sign in the
  381. sort specification:  SM /SS-:
  382.  
  383. Space Map 2.0   Copyright (c) 1991,1992 Ben Smith
  384. ╔══════════════════════╤═══════════╤═══════════╗
  385. ║ Tree                 │   Size    │   Alloc   ║
  386. ╟──────────────────────┼───────────┼───────────╢
  387. ║ C:\TEMP              │   398,650 │   499,712 ║
  388. ║ ├─OVERVIEW           │   767,171 │   774,144 ║
  389. ║ │ ├─NONEMPTY         │    63,275 │    65,536 ║
  390. ║ │ ├─EMPTY            │         0 │         0 ║
  391. ║ ├─OVERVIEW           │   830,446 │   839,680 ║
  392. ║ ├─ARCHIVE            │    26,599 │    28,672 ║
  393. ║ ├─NEW                │     1,353 │     4,096 ║
  394. ║ ├─EMPTY              │         0 │         0 ║
  395. ║ │ ├─NOTRLY           │         0 │         0 ║
  396. ║ ├─EMPTY              │         0 │         0 ║
  397. ║ C:\TEMP              │ 1,257,048 │ 1,372,160 ║
  398. ╚══════════════════════╧═══════════╧═══════════╝
  399.  
  400. You can sort on size (S), allocated size (A), time and date (D), or file
  401. name (N).  Only one sort option can be used at a time.
  402.  
  403. COLOR DISPLAY:
  404.  
  405. Normally, Space Map presents its information in glorious black and
  406. white.  This is so that the information can be redirected to a printer
  407. or file with ease.  However, if you have ANSI.SYS (or one of the
  408. shareware/freeware/commercial replacements) installed, you can display
  409. the information in a not-very-impressive color display.  The color
  410. display simulates green-bar paper by printing three lines in
  411. black-on-white, and the next three lines in black-on-cyan.  This
  412. improves the readability considerably, to my eye.
  413.  
  414. To turn on the color display, add the /C+ option to the command line.
  415. If you have color on as a default in the environment, you may turn it
  416. off (for redirection, for example) by typing /C- on the command line.
  417.  
  418. Finally, note that SM does NOT check to see if ANSI is installed.  You
  419. can send an ANSI-embedded report to a file or to a printer, although I
  420. can't imagine why you'd want to do such a thing!
  421.  
  422. PAUSING BETWEEN DISPLAY PAGES:
  423.  
  424. You can instruct Space Map to pause between display pages without
  425. resorting to the DOS MORE command.  Just include /P anywhere on the
  426. command line.  SM will try to determine the number of rows on the screen
  427. and correctly interprets special EGA and VGA modes, as well as the
  428. special modes provided by Personics' ULTRAVISION program.
  429.  
  430. THE ENVIRONMENT:
  431.  
  432. You'll find, if you use Space Map extensively, that you're constantly
  433. using the same options:  You may turn on the color display through /C+,
  434. or you may decide to list the number of files through the /If option.
  435. To turn these on semi-permanently, you can set the SMAP environment
  436. variable to the options you wish to enable.  To turn on the two options
  437. given above, you could enter:
  438.  
  439.      SET SMAP=/C+/IF
  440.  
  441. Then, Space Map as a default would display in color and display a count
  442. of files along with the size and allocated size in the display.
  443.  
  444. Note that options given on the command line override options given in
  445. the environment.  Also note that three options (/P - Pause, /F - include
  446. Files, and the file path) cannot be overridden, and should therefore
  447. be included in the environment variable with care.
  448.  
  449. TECHNICAL INFORMATION:
  450.  
  451. DOS REPORTED SIZE vs. ALLOCATED SIZE:  When DOS reports the size of a
  452. file, it reports ONLY those bytes which are actually in use.  But when a
  453. program asks for a block of storage, DOS may actually give the program
  454. MORE storage than it asked for!  Here's why...
  455.  
  456. A disk generally consists of one or more platters, which are round
  457. aluminum disks on which ferric oxide has been coated.  Each platter is
  458. served by (generally) two heads, one on the top and one on the bottom.
  459. Each surface is divided into circular tracks, and each track is
  460. divided into arc-shaped sectors which contain (generally) 512 bytes
  461. each. The tracks have to be divided into sectors because the write
  462. signal to the head can't actually turn on and off instantly, and if you
  463. tried to change, say, byte 2,345 on a track, you'd probably wipe out a
  464. few hundred bytes on each side of the one you were trying to change.  To
  465. prevent this, the disk manufacturers make you read an entire sector,
  466. make the change to the sector in memory, and the write the entire sector
  467. back.  Each sector is surrounded by an "inter-record gap" which is a
  468. safe place to turn on and off the current to the write head.  The space
  469. taken up by these gaps is not inconsequential; in fact, it may consume
  470. ten to fifteen percent of the disk. Consequently, it's good to make the
  471. sectors as large as possible (that way, less good disk surface is taken
  472. up by the inter-record gaps).
  473.  
  474. The problem is that the sector becomes the smallest unit of storage
  475. that you can address!  A typical disk has 512 bytes per sector, and
  476. this means that if you have a one-byte file, it is stored on a 512
  477. byte sector, with the other 511 bytes unused!  Worse, DOS usually
  478. treats eight physical disk sectors as the smallest allocatable unit of
  479. storage (called a cluster), which means that that one-byte file
  480. actually wastes 4,095 bytes!  And some disk compression programs
  481. encourage even larger clusters!!
  482.  
  483. Well, the "Allocated" number tells you how much DOS has allocated for
  484. your files.  The difference between that number and the "Size" tells
  485. you how much disk space the file system is "wasting" because of the
  486. granularity of the file system itself.  Unfortunately, there's not much
  487. you can do about this...it's a problem built into the file system.  But
  488. if you want to see the problem in all its glory, look at a directory
  489. full of Windows icons...each 766 byte icon gets allocated 4,096 bytes!
  490.  
  491. The third line tells you the space used in the first subdirectory of
  492. C:\TEMP; that is, the OVERVIEW directory (C:\TEMP\OVERVIEW) in the
  493. same format used in the previous line.    The fourth line tells you that
  494. the first subdirectory of OVERVIEW (C:\TEMP\OVERVIEW\EMPTY) has no
  495. files (and so is appropriately named).    The fifth line gives the space
  496. used by the second subdirectory under OVERVIEW
  497. (C:\TEMP\OVERVIEW\NONEMPTY).
  498.  
  499. Now, the sixth line is the interesting one.  It gives the space used
  500. by the OVERVIEW subdirectory AND ALL DIRECTORIES BENEATH IT.  Add it
  501. up yourself, and see.
  502.  
  503. REDIRECTION:  This program uses only DOS calls to send information to
  504. the screen.  Consequently, the output of the program can be redirected
  505. to any DOS device, including a file, a printer, or a serial device.
  506. In fact, sending the information to a printer is a good way to keep
  507. permanent record of what's on your disk.  To direct the output of this
  508. program to a printer, just type:
  509.  
  510.        SM >prn
  511.  
  512. UNDOCUMENTED CALLS:  This program uses Interrupt 21H Function 60H,
  513. "Expand Path Name String," to determine the drive and directory that is
  514. being requested.  This is an undocumented DOS call which was introduced
  515. in DOS Version 3.0 and has been present in every DOS version since then.
  516. It appears to work with the OS/2 compatibility box, and is emulated in
  517. DR-DOS, according to reports (I haven't tested this).  I'd love to hear
  518. from anyone with firsthand information on this.
  519.  
  520. This program uses an EGA BIOS call (INT 10H Function 1130H) to determine
  521. the number of rows in the display.  On CGA and monochrome displays the
  522. program should default to 25 lines.  Again, if you experience problems,
  523. contact me.
  524.  
  525. MEMORY LIMITATIONS:  Version 1 of this program used no storage beyond
  526. the program segment.  This version may use as much of the base DOS ram
  527. as is made available to it by the .COM loader.  The memory is used to
  528. load a representation of the tree structure for sorting.  Each file and
  529. directory to be displayed requires 48 bytes of internal storage;
  530. consequently, a machine with 600K free memory could display over 12,000
  531. entries before running out of memory.  If the program fills memory, the
  532. program will alert you to the out of memory condition.  When this
  533. happens, you should re-run Space Map specifying fewer files (for
  534. instance, deleting the /F option, or using /Dx to limit the search
  535. depth.)
  536.  
  537. PERFORMANCE:  The program traverses the entire 80MB disk on an 286/8
  538. in about fifteen seconds.  It scans a 200MB drive on a 386/33 in about
  539. twelve seconds.
  540.  
  541. NETWORK USE:  Space Map works very nicely on a network, although it
  542. may behave in a way you don't expect.  First, if you're using a Novell
  543. network and have drives MAP ROOTed to a server subdirectory, Space Map
  544. will see through that.    For example, if you have a file server named
  545. SERVER1, a volume mounted on that server named SYS, and a subdirectory
  546. on SYS named \USER\BOB mapped to drive G:, and you ask Space Map to
  547. display drive G's contents, the top line will report that you are
  548. viewing "\\SERVER1\SYS\USER\BOB".  This is because Space Map uses
  549. DOS's True Name function, and this is the true name to DOS of the
  550. network drive.    Space Map has been tested extensively only on Novell
  551. networks, but should work on any network supported by DOS.
  552.  
  553. OTHER INFORMATION:  If you need to communicate with the author, he is:
  554.  
  555.     Ben Smith
  556.     110 S. Gardenia
  557.     Celeste, TX  75423
  558.  
  559. My CompuServe ID is 70143,2023, but I only check mail about twice a
  560. week.
  561.  
  562. DEVELOPMENT INFORMATION:  Version 1 of this program was developed using
  563. Microsoft's Macro Assembler version 6.0 over a couple of days in
  564. December, 1991.  Version 2 took a little longer -- a couple of weeks in
  565. January, 1992. It is coded in 100% assembly language. The program was
  566. tested extensively on two different computers:  A Northgate 386/33 with
  567. a 200MB hard drive connected to a Novell NetWare 2.15C server via SMC
  568. 10baseT media; and an AMT-286 8MHz AT clone.  Both machines run MS-DOS
  569. version 5.
  570.  
  571. ENHANCEMENTS:  I've thought of several things I could do to this
  572. program to improve it, but none that could be done quickly or easily.
  573. If you think of something I've left out of a program of this scope,
  574. drop me a line.  I can't promise I'll implement any suggestion (the
  575. program IS free, after all) but I'll consider it and respond.
  576.  
  577. SOURCE CODE AVAILABILITY:  Source code can be made available on a paid
  578. license basis.    Contact me by mail or CompuServe for other details.
  579. The price of a source code license would depend greatly on the use to
  580. which the code is to be put, but I'm very reasonable!
  581.