home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / DEMO510.ZIP / DIRMNT3.INS / DIRMAINT.DOC next >
Text File  |  1999-01-25  |  15KB  |  376 lines

  1.  
  2. DIRMAINT -- Searchlight BBS File Directory Maintenance Program
  3. Version 4.5 April 1995
  4.  
  5. -------------------------------- IMPORTANT --------------------------------
  6.  
  7. This is a new version of DIRMAINT that contains a subtle, but important, 
  8. change in the way command line parameters are given. In the old DIRMAINT 
  9. program, DIRMAINT operated directly on Searchlight *.SL2 directory files, 
  10. bypassing the CONFIG file and directory list. Thus, you could type DIRMAINT 
  11. commands that included paths, such as: 
  12.  
  13.   Dirmaint c:\slbbs\uploads u *.zip
  14.   Dirmaint uploads u c:\uploads\*.zip
  15.  
  16. The new DIRMAINT program uses the pathnames stored in your CONFIG files
  17. and does not require (or accept) the use of pathnames on the command line.
  18. Thus, remove any pathname references from existing command lines.  
  19.  
  20. In addition, Dirmaint 3.5 requires access to your CONFIG file for proper 
  21. operation. This means you should either execute DIRMAINT commands from your 
  22. Searchlight home directory, or else set an environment variable equal to the 
  23. home directory location; ie.: 
  24.  
  25.   SET SLBBS=C:\SLBBS
  26.  
  27. When adding files, Dirmaint 3.5 uses the current user as the file's owner,
  28. rather than the Sysop account. You can override this by specifying an
  29. explicit file owner with the /O command. If necessary, update your existing 
  30. batch files or command lines, especially those that take place during events 
  31. or offline processing, to avoid creating files with random owner names. (To 
  32. emulate the old behavior, add /OSYSOP to existing command lines).
  33.  
  34. Because it reads the CONFIG file, the /R command line parameter is no longer 
  35. required to perform record locking.
  36.  
  37. -------------------------------- IMPORTANT --------------------------------
  38.  
  39.  
  40. Version 4.5
  41. Dirmaint version 4.5 allows you to use wildcards for the directory name.
  42. Hence, you can process many directories with a single command. For example:
  43.  
  44.   DIRMAINT CD* U /F
  45.  
  46. This command would update all directories in your system that match the 
  47. wildcard CD* (for example, CD001, CDGAME, CDUTIL, etc).
  48.  
  49. Version 4.0
  50. This is a maintenance release that is compiled to take advantage of new
  51. directory management features in the Searchlight 4.0 code. There are no
  52. functional differences. An out of memory problem that appeared in the
  53. previous release has been addressed, and should be fixed.
  54.  
  55.  
  56. Version 3.5A
  57. This is a minor maintenance release which includes:
  58.   - Directory description files are now repaired with Balance commands
  59.   - Alias names are acceptable when using the Owner command
  60.  
  61. Version 3.5 Update
  62. Dirmaint version 3.5 includes several new features:
  63.   - A /O command for changing or setting a file's owner
  64.   - Support for entering long file descriptions
  65.   - Support for loading file descriptions from a text file
  66.   - A command to balance/repair directories
  67.  
  68.  
  69. Introduction
  70.  
  71.    DIRMAINT is a command-line utility program for Searchlight BBS which 
  72. allows you to maintain Searchlight file directories outside of the main 
  73. BBS.EXE program. Dirmaint includes commands to add and delete files, update 
  74. files (file size, date, owner, or description), password protect (or 
  75. unprotect) files, or increment file download counts. It can also be used to 
  76. balance (optimize) and repair directory indexes.  
  77.  
  78.  
  79. Syntax
  80.  
  81. The syntax for DIRMAINT is as follows:
  82.  
  83.    DIRMAINT DirName Command [Options] FileName(s) ["Descrip/Passwd"]
  84.  
  85. The first parameter, DirName, is the name of the directory file that you 
  86. will be updating. This should be the same one to eight character filename
  87. that is used in directory listings and the CONFIG program within 
  88. Searchlight, and should not include any pathnames or extensions.
  89.  
  90. Note: Dirmaint needs to open the CONFIG.SL2 file for the current node. If 
  91. you run the Dirmaint command outside of the node's home directory, you 
  92. should set an environment variable equal to the home directory path; ie. SET 
  93. SLBBS=C:\SLBBS.  
  94.  
  95.  
  96. The main commands are:
  97.  
  98.     A   Add file
  99.     K   Kill files
  100.     U   Update files
  101.     P   Password protect files
  102.     D   Increment download count
  103.     B   Balance/repair directory
  104.  
  105. Options are:
  106.  
  107.     /F  Use file date when adding or updating
  108.     /D  Use DOS system date when adding or updating
  109.     /P  Prompt for descriptions or passwords
  110.     /A  Balance all directories (used only with the B command)
  111.     /X<FileName>  Read long file description from text file
  112.     /O<UserName>  Set name of file owner when adding/updating
  113.  
  114. Any combination of one or more single filenames or wildcards can be 
  115. specified on the command line; wildcards are processed differently for the 
  116. Add command than they are for the Kill, Update and Password commands (see 
  117. below). Finally, one short file description may be included in quotes (must 
  118. be in quotes) for Add or Update commands or one password (also in quotes) 
  119. with the Password command. Use the /P switch if you want to add or update 
  120. several descriptions or passwords at once. Use the /X or /P switches if you 
  121. want to add or update long descriptions.
  122.  
  123.  
  124. Add Files
  125.  
  126.    Dirmaint lets you add one or more legal filenames to the directory, 
  127. whether or not the files actually exist. If a file does exist, its size is 
  128. read from the DOS directory; otherwise, the size is set to zero and the file 
  129. is marked as an offline file. Dirmaint checks for files in the directory's
  130. "Path to Files" path (as specified in the CONFIG program), regardless of the 
  131. current directory. Therefore, be sure to copy files into the correct files 
  132. path for the directory before running Dirmaint (Dirmaint does not move or 
  133. copy files, it only updates the Searchlight directory database).
  134.  
  135.    If the /F command line parameter is used, Dirmaint reads the file's last 
  136. update date directly from the DOS directory and assigns that date to the 
  137. SLBBS file entry. Otherwise, the current system date is used.
  138.  
  139.    If you wish to specify an owner for the file (ie. name of person who 
  140. "uploaded" the file), use the /O option switch, followed immediately by the 
  141. desired username. If the username has several words, replace spaces by 
  142. underbars. For example:
  143.  
  144.     DIRMAINT Uploads A /OJames_Jones Myfile.ZIP
  145.  
  146. Here, the user "James Jones" is recorded as having uploaded the newly added 
  147. file, MYFILE.ZIP. If no /O parameter is given, or if the given username does 
  148. not exist in your Searchlight user file, then the name of the currently 
  149. logged in user is used.
  150.  
  151.    There are several ways to enter file descriptions. Short descriptions can 
  152. be entered directly on the command line:
  153.  
  154.     Dirmaint Uploads A /OJames_Jones Myfile.ZIP "Short file description"
  155.  
  156. Long descriptions can be entered by specifying the /X parameter, followed
  157. immediately by the name of a text file containing the description text:
  158.  
  159.     Dirmaint Uploads A /Xlngdscp.txt Myfile.ZIP "Short description"
  160.  
  161.    If /P was specified on the command line, Dirmaint will prompt you to 
  162. enter a short and long description for each file added. If multiple files 
  163. are added and no /P switch is used, the description given on the command 
  164. line and/or filename is given to all files added. Since Dirmaint reads the 
  165. standard input stream when inputting descriptions, it is possible to 
  166. redirect a list of descriptions to Dirmaint with a pipe.
  167.  
  168.    Add Files supports the addition of multiple filenames in the following 
  169. manner: for each wildcard specified on the command line, all files which 
  170. exist in the DOS directory that match the specification are added.  Each 
  171. single, non-wildcard filename is added regardless of whether a matching DOS 
  172. file exists (the file is marked as offline if it cannot be found). You can 
  173. specify any number of single filenames and/or wildcards on each command line 
  174. (separated by spaces) with the only limitation being the length of the 
  175. command line. See examples below.
  176.  
  177.    An attempt to add a file that already exists in the Searchlight directory 
  178. will be ignored. Use the update command to change existing files.
  179.  
  180.  
  181. Kill Files
  182.  
  183.    This command deletes the specified entries from the Searchlight directory 
  184. file (the actual DOS files, if any, are not deleted or modified). No options 
  185. or description need be included for Kill commands. A count of the number of 
  186. files killed is printed on exit.  
  187.  
  188.  
  189. Update Files
  190.  
  191.    This command updates the specified files by changing the file sizes to 
  192. the actual DOS file sizes and, optionally, modifying the file dates, 
  193. descriptions, and/or owners. If a DOS file exists, the Searchlight directory 
  194. entry is updated to reflect the DOS file's actual size. Otherwise, the DIR 
  195. entry is marked as an offline file (the old file size is not changed).  
  196.  
  197.    If you include a description on the command line, Dirmaint updates the 
  198. file's short description, replacing it with your command line argument. 
  199. Similarly, if you include the /X<FileName> parameter, the long description 
  200. is replaced with the contents of the text file. If you include the /P 
  201. switch, Dirmaint prompts you to enter a new description for each file 
  202. updated. If you update multiple files and include a command line 
  203. description, you will assign that description to ALL files being updated.  
  204.  
  205.    If the /D or /F options are given, Dirmaint updates file dates. As with 
  206. the Add command, the /F switch loads the file dates from the DOS directory 
  207. entry, whereas the /D switch loads the current system date. If /F is used, 
  208. but a file does not exist, then the system date is used by default. If 
  209. neither /F nor /D are given, the date is not changed.  
  210.  
  211.    If the /O<UserName> switch is used, Dirmaint changes the file's owner to 
  212. the username given. If the username doesn't exist, the file's owner is not 
  213. updated. For usernames that contain spaces, replace the spaces with underbar 
  214. characters on the command line (for example, "/ORobert_A._Reed").
  215.  
  216.  
  217. Password Protect Files
  218.  
  219.    This command allows you to change the password of the specified files.  
  220. You can enter a password on the command line (in quotes) or use the /P 
  221. switch to have Dirmaint prompt you for a password. To remove a password 
  222. from a file, either give no password on the command line, or press Enter 
  223. when prompted for a password.
  224.  
  225.    Note that if you specify a password on the command line and multiple 
  226. files, all files are assigned the same password.
  227.  
  228.  
  229. Increment Download Count
  230.  
  231.    This command just increments the number of times downloaded count for the 
  232. file(s). This is useful if you use external utilities to download files and 
  233. you want to record the download.  
  234.  
  235.  
  236. Balance Directory
  237.  
  238.    This command runs the Balance/Repair directory function on the specified 
  239. directory. This both optimizes the directory's internal binary tree, and 
  240. repairs any corrupted index pointers within the file. It's a good idea to 
  241. run the balance procedure periodically or any time you suspect that a 
  242. directory file is corrupt:
  243.  
  244.    DIRMAINT UPLOADS B
  245.  
  246.    The balance function can be used in conjunction with the /A option switch 
  247. to balance all directories with a single command. For this, a special syntax 
  248. is required: instead of specifying a directory name, enter:
  249.  
  250.    DIRMAINT * B /A
  251.  
  252. This command will balance and repair all directories.
  253.  
  254.  
  255.  
  256. Directory Issues
  257.  
  258.    Dirmaint requires access to the CONFIG.SL2 file for the current node.
  259. Once the CONFIG file is opened, Dirmaint can process the directory list
  260. and files regardless of their location in your system. Therefore, either run 
  261. Dirmaint from your home directory, or set an environment parameter equal to 
  262. the home directory location (as in SET SLBBS=C:\BBS).
  263.  
  264.    When adding files, if the /O switch is not used, the file's owner becomes 
  265. the name of the person who is logged in on the node for which Dirmaint has 
  266. opened the CONFIG.SL2 file. If you use dirmaint in events or offline 
  267. processing, use the /O switch to specify an explicit username, in order to 
  268. avoid a random owner name (for example, /OSysop).
  269.  
  270.  
  271.  
  272. Examples:
  273.  
  274. DIRMAINT Uploads A ALLFILES.ZIP "List Of Available Files"
  275.  
  276.    This command adds the file ALLFILES.ZIP to the UPLOADS directory. The 
  277. file is added with a short description of "List Of Available Files", and the 
  278. current system date. There is no long description. The current user becomes 
  279. the file's owner.
  280.  
  281.  
  282. DIRMAINT Uploads A /F SL*.ZIP "Searchlight support file"
  283.  
  284.    This command adds to the Uploads directory all files that match the 
  285. wildcard SL*.ZIP which are not already listed in the directory. Each file 
  286. is added with the file's actual date, and the description "Searchlight 
  287. support file".
  288.  
  289.  
  290. DIRMAINT Uploads A /XFILE_ID.DIZ /OSysop MYFILE.ZIP "My new file"
  291.  
  292.    Adds the file MYFILE.ZIP to the Uploads directory. The file's short 
  293. description is "My new file", and the long description is read from the text 
  294. file FILE_ID.DIZ. The SYSOP is made the file's owner.
  295.  
  296.  
  297. DIRMAINT Uploads A /P TEMP.ZIP UPDATE.ZIP
  298.  
  299.    Adds the files TEMP.ZIP and UPDATE.ZIP to the Uploads directory, 
  300. prompting for descriptions. The filenames are entered into the uploads 
  301. directory regardless of whether they actually exist.
  302.  
  303.  
  304. DIRMAINT Uploads K TEMP.ZIP SL*.ZIP UPDATE.ZIP
  305.  
  306.    Deletes TEMP.ZIP, UPDATE.ZIP, and all files matching the wildcard 
  307. SL*.ZIP. A count of the number of files deleted is displayed.
  308.  
  309.  
  310. DIRMAINT Uploads U /F ALLFILES.ZIP
  311.  
  312.    Updates the entry for ALLFILES.ZIP to reflect the current file size and 
  313. file date for that file.
  314.  
  315.  
  316. DIRMAINT Uploads U /P SL*.ZIP
  317.  
  318.    Updates the file sizes for all files matching the wildcard, and also 
  319. prompts for new descriptions for the files. The file dates are not 
  320. changed.
  321.  
  322.  
  323. DIRMAINT Uploads U /OJohn_Hutch *.*
  324.  
  325.    This command changes the ownership of all files in the Uploads directory 
  326. to "John Hutch", assuming this user exists in the user file.
  327.  
  328.  
  329. DIRMAINT Uploads U ALLFILES.ZIP "Master file directory list"
  330.  
  331.    Changes the short description of ALLFILES.ZIP to "Master file directory 
  332. list". The file size is also updated. The long description, if any, is not 
  333. affected.
  334.  
  335.  
  336. DIRMAINT Uploads U ALLFILES.ZIP /XDescrip.Txt
  337.  
  338.    Changes the long description of the file ALLFILES.ZIP to the contents of 
  339. the text file "Descrip.TXT". The short description is unchanged.
  340.  
  341.  
  342. DIRMAINT Uploads P MYFILE.TXT "Tornado"
  343.  
  344.    Changes the password on MYFILE.TXT to "Tornado". Passwords are not case 
  345. sensitive.
  346.  
  347.  
  348. DIRMAINT Uploads P MYFILE.TXT /P
  349.  
  350.    Prompts for the password for MYFILE.TXT. Note that passwords are entered 
  351. once only and are displayed as entered (unlike the bbs program, which uses 
  352. a dots-echo input routine and double checks entries).
  353.  
  354.  
  355. DIRMAINT Uploads P *.*
  356.  
  357.    Removes passwords from all files in the Uploads directory.
  358.  
  359.  
  360. DIRMAINT Uploads D ALLFILES.ZIP
  361.  
  362.    Increments the download count for file ALLFILES.ZIP. You might wish to 
  363. run this command if, for example, the file was downloaded during a door 
  364. process.
  365.  
  366.  
  367. DIRMAINT Uploads B
  368.  
  369.    Balances and repairs the Upload directory's binary tree index.
  370.  
  371.  
  372. DIRMAINT * B /A
  373.  
  374.    Balances and repairs the tree indexes for all directories.
  375.  
  376.