home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / PSION / UTILS / JBTR424 / JBTREE.TXT < prev   
Encoding:
Text File  |  1995-04-23  |  23.8 KB  |  526 lines

  1.                                 JBTree
  2.                             Version 4.2.4
  3.                            (c)JBSoft 1992-5
  4.  
  5. This is a program which displays the directories and files on any disk
  6. (internal or external). It shows the current directory and other
  7. directories at the same level, plus any directories immediately
  8. subordinate to the directory on which the cursor is on. It also
  9. displays the files in the current directory - the date will take the
  10. same format as that set in the Time application. The program is free
  11. for your use but I retain all copyright on the code (where applicable
  12. - some of the Pack information was provided by Wolfgang Schirmer and
  13. Matthew Millar - thanks).
  14.  
  15.  
  16. N.B. If you can't be bothered to plough through this document please
  17.      note that Copy, Move etc. only work after you have Marked the
  18.      file using the Space Bar or the Enter key. Also, for
  19.      installation, please read that section or you'll be sorry <g>!
  20.  
  21. Background
  22. ----------
  23. This utility was first started in the days of the Series 3 but I only
  24. got it to a reasonable state on the appearance of the Series 3a. It
  25. has been translated, and therefore will only run in its present state,
  26. on an S3a although I suspect it could be adapted to compile and run on
  27. an S3 with some compromises. There are some limitations which I
  28. suspect you will discover as you use it.
  29.  
  30. Manual and Usage
  31. ----------------
  32. This is work in progress (I suppose, as I keep changing it) and so it
  33. comes without a proper manual (it's also got fairly complex and I
  34. don't really have the time to write a proper one). This document is
  35. getting close to turning into a manual as I expand on it. Help is
  36. available on the HELP key at most times and, as with most OPL
  37. programs, you can escape using Psion-Esc or Psion-X at almost any
  38. time.
  39.  
  40. The history information (which used to appear at the end of this text
  41. file has been moved to a new file called JBTHISTR.TXT as it was
  42. getting rather large.
  43.  
  44. Installation
  45. ------------
  46. The files listed below should be part of the JBTree ZIP file:-
  47.  
  48.         JBTREE.OPA - The main part of the program
  49.           JBTL.DBF - Install if Launch is to be installed
  50.         JBTREE.DBF - Data file required for View/Run options
  51.            JBT.DBF - My example file of JBTREE.DBF (included as part
  52.                      of the explanation - should not be installed
  53.         JBTREE.TXT - This file/manual
  54.  
  55. Copy JBTREE.OPA to any directory (normally \APP\ but this is not
  56. mandatory) and install it in the usual way using Psion-I. If you
  57. require to view files using their native application then the file
  58. JBTREE.DBF should also be placed in the \APP\ directory. When JBTree
  59. is first run the file is moved to a sub-directory off the directory
  60. JBTree is installed in called \JBTREE\ (e.g. \APP\JBTREE\).
  61.  
  62. This sub-directory drive for the configuration files can be chosen
  63. and, if the JBTREE directory does not exist, then a dialog to choose
  64. the drive will be given. The directory should be created automatically
  65. - if not, it is permissible to generate it manually. Please note that
  66.  
  67. if the parent directory (normally \APP\) does not exist then this
  68. automatic installation may fail.
  69.  
  70. If you are updating your version then you will have to manually move
  71. the configuration files to the appropriate directory. The program
  72. looks for these files in a directory off the directory that JBTREE.OPA
  73. is in (i.e. if JBTree is in \JBT\ then the configuration files MUST be
  74. in the directory path \JBT\JBTREE. This path can, however, be on a
  75. different drive to that of the OPA file.
  76.  
  77. There has been one instance of the directory not being created of
  78. which I am aware although this problem was not repeatable.
  79.  
  80. If you require the Launch menu then JBTL.DBF should also be placed in
  81. the \APP\ directory. This will be moved to the appropriate directory
  82. by the main program when it is first started.
  83.  
  84. N.B. Care should be taken when upgrading the program - no datafiles
  85.      will be overwritten if they already exist in the \JBTREE\
  86.      directory when the program is started. If you wish to upgrade (or
  87.      replace) the datafiles then the original datafiles in the
  88.      \JBTREE\ directory must be deleted first or the files concerned
  89.      manually transferred to this directory.
  90.  
  91.      JBTL.OPO which was required for version 4 and 4.1 is not now
  92.      needed and will be automatically deleted when JBTree is first
  93.      run.
  94.  
  95. Starting the program
  96. --------------------
  97. To start the program place the cursor on the JBTree word and press
  98. Enter to start the program.
  99.  
  100. After starting the program you are prompted for a Drive - if the 3-
  101. Link is active then, before the drive menu is accessed, a choice of
  102. Local or Remote is given. Remote means drives on the remote computer.
  103. If the drive you wish to access is not shown on the menu then press
  104. Esc and you can then select almost any drive (including the ROM) with
  105. the dialog displayed at this point.
  106.  
  107. N.B. If the letter keys (e.g.'F') do not appear to work or do not work
  108.      as expected, check that you do not have CAPS LOCK on. The S3a is
  109.      case sensitive on the keys checking. Unfortunately, unlike the
  110.      good old Organiser II, it does not appear possible to alter the
  111.      state of the CAPS LOCK from within the program using OPL so
  112.      please be sure that this is switched off whilst using the
  113.      program.
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. Keys Used
  134. =========
  135.  
  136.                            General
  137.                            -------
  138.                             : Up
  139.                            : Down
  140.                         PgUp: Page Up
  141.                        PgDn: Page Down
  142.                  Ctrl-Psion-Up/Home: 1st Dir
  143.                 Ctrl-Psion-Down/End: Last Dir
  144.                     Tab: Files/Dir switch
  145.                   Diamond: Files/Dir switch
  146.                     Psion-J: Info (About)
  147.                         Psion-S: Sort
  148.                #(character key): Goto dir/file
  149.                 Psion-Shift-C: JBTree Config
  150.                  Psion-Shift-F: View Config
  151.               Psion-U: Update Directories/Files
  152.                      Psion-F: Pack Info
  153.                Shift-Psion-L: Launch sub-menu
  154.                         Psion-X: Exit
  155.  
  156.                       In Directory Tree
  157.                       -----------------
  158.                     Psion-D: Change Drive
  159.                          : Sub-Dir
  160.                           : Up-Dir
  161.                       Psion-+: Add Dir
  162.                       Psion--: Del Dir
  163.                      Psion-C: Copy Dirs
  164.                      Psion-M: Move Dirs
  165.                      Psion-R: Rename Dir
  166.                  Psion-Shift-D: Delete Dirs
  167.                    Psion-L: Look for File
  168.                      Psion-A: Look again
  169.                Ctrl-A/B/M: Quick drive change
  170.  
  171.                         In Files List
  172.                         -------------
  173.                  Psion-I: Toggle Files Info
  174.                    Psion-T: Mark All Files
  175.                Psion-Shift-T: Unmark All Files
  176.                    Space: Mark file toggle
  177.                 <CR>: Mark toggle + Move down
  178.                        Psion-D: Delete
  179.                         Psion-C: Copy
  180.                Psion-(Shift)M: Move (& Rename)
  181.                        Psion-R: Rename
  182.                 Psion-Shift-R: Copy & Rename
  183.                   Psion-A: File Attributes
  184.                         Psion-N: Info
  185.        Psion-(Shift)V/Psion-H: View file(in Word)/Hex
  186.  
  187.  
  188. Moving Around
  189. -------------
  190. Use the cursor keys in the normal way. To go to a sub-directory use the
  191. right arrow key, to go to the parent directory above the present one use
  192. the left arrow key. To flip between the Directory list and the Files list
  193. use Tab or the Diamond key. If in the Files list then Escape will also take
  194. you to the Directory list. To change the drive use Psion-D whilst in the
  195. directory list. An alternative, if just the local drives are required, is
  196. to use Ctrl-A -B or -M. This bypasses the dialogs and so speeds up the
  197. selection a little.
  198.  
  199. It is possible to jump to a directory or file within the current list by
  200. using 'c' where 'c' is the first character of the name to find.
  201.  
  202. Create/Delete/Rename Directories
  203. --------------------------------
  204. It is possible to create new directories by positioning on the directory to
  205. which the directory to be created will be subservient and then using Psion-
  206. + (the Psion key along with the '+' key). Deletion of a directory (which
  207. must be empty of files) is achieved by using Psion-- (the Psion key
  208. together with the '-' key). It is also possible to delete a whole sub-
  209. directory tree (including any files) using Psion-Shift-D. To rename a
  210. directory, place the cursor on the directory to be renamed and press Psion-
  211. R. A dialog will display showing the old name and prompting for the new one
  212. (the default display shows the same name as the old). After entering the
  213. new directory name, press return and (eventually) the screen will display
  214. showing the new directory name.
  215.  
  216. Copying/Moving/Deleting
  217. -----------------------
  218. When in the File list the required files must be selected by using either
  219. the Space bar or Enter before any action can be taken. After marking the
  220. selection is denoted by a star beside the filename. The keys used for
  221. marking can also be used to deselect a file in the same way (they act as a
  222. toggle). All files in the current directory can be marked using Psion-T and
  223. deselected using Psion-Shift-T.
  224.  
  225. Once the files have been marked then use of Psion + C/M/D will either
  226. copy/move or delete the selected files. If copy or move are selected then
  227. the display will re-display the directory tree and you should move to the
  228. appropriate destination drive and directory in the usual way before
  229. pressing Enter. You can create new directories whilst in this selection
  230. mode. Enter will activate the copy or move. If you require to Copy or Move
  231. together with Renaming the file - use Psion-Shift-R for Copy & Rename and
  232. Psion-Shift-M for Move and Rename.
  233.  
  234. It is possible to bring up a dialog to enable the input manually of the
  235. destination directory. Use Ctrl-Psion + C/M to do this. If the destination
  236. as typed does not exist then the option to make it is shown. Escape at any
  237. point will take you back to the normal choice method of choosing the
  238. destination directory.
  239.  
  240. The program will do bulk copying/moving/deleting of directories using
  241. Psion+C/M/Shift-D. When copying or moving an option is given to use the
  242. existing directory or not. What this means is that the data in the top
  243. directory chosen to copy or move will either go into the destination
  244. directory chosen or will create a directory below the destination directory
  245. and use that. (e.g. Source directory = A:\JBTREE : Destination directory =
  246. A:\DOS. If Existing is chosen then the files in the JBTREE directory will
  247. end up in the DOS directory and any sub-directories will be created below
  248. the DOS directory; If Existing is not chosen then a directory called JBTREE
  249. will be created as a sub-directory of DOS and the files moved accordingly.)
  250.  
  251. Other options
  252. -------------
  253. Files can be renamed by highlighting them using the cursor and pressing
  254. Psion-R. A dialog is displayed allowing the name and/or the extension to be
  255. changed.
  256.  
  257. File attributes can be reset using Psion-A once the files to be changed
  258. have been marked. If no file is marked then the attributes for the current
  259. file under the cursor is shown. If Escape is pressed (rather than return)
  260. when in the Set dialog then the viewing is abandoned. Changes are made
  261. using the Enter key once the dialog has been set as required. The
  262. attributes set will alter all the programs marked without further querying.
  263. This is primarily to facilitate bulk changing of attributes - alter the
  264.  
  265. files on an individual basis if different attributes are to be set for each
  266. file.
  267.  
  268. Finding a file
  269. --------------
  270. It is possible to find a file on a particular drive. By pressing Psion-L a
  271. dialog shows prompting for the file to find. This need not be the full name
  272. but just sufficient to identify the file. If the file is found the display
  273. will stop on that directory. If the search is be resumed use Psion-A to
  274. continue the existing search. Because of the potential for continuing the
  275. search I have had to get all the directory names before starting the search
  276. and the screen will reflect this delay before the search is commenced.
  277.  
  278. Only the current drive is searched - to search other drives you must first
  279. move to the required drive before implementing the search. Wildcards are
  280. not implemented but a partial filename is acceptable (e.g. JBT would find
  281. JBTREE and any other files starting with JBT).
  282.  
  283. Viewing a file
  284. --------------
  285. One thing that may not be clear from the help page is that it is possible
  286. to View or Launch files with the aid of a configuration database file
  287. called JBTREE.DBF. This can be configured from within JBTree using Psion-
  288. Shift-F. It will Launch anything (including things like Notepad and Macro)
  289. given the correct configuration. There are four fields in the configuration
  290. file:
  291.  
  292. 1. Extension      - this is the extension the launch utility will use
  293.                     to determine which database record in JBTREE.DBF
  294.                     to use. When launching a file the database is
  295.                     searched for an extension which matches that of
  296.                     the file to launch.
  297. 2. Run filename   - this is the program to run in conjunction with the
  298.                     file selected (e.g. WRD extension should use
  299.                     ROM::WORD.APP). Any OPO or OPA file should use
  300.                     ROM::SYS$PRGO.IMG.
  301. 3. Extra filename - This field is for use with OPA files that use file
  302.                     lists (e.g. Notepad). If this field is used then
  303.                     it is probable that the Run filename will be
  304.                     ROM::SYS$PRGO.IMG.
  305. 4. Alias Info     - currently the only program that would use this
  306.                     field is WORD unless there is a 3rd party
  307.                     application of which I am unaware.  The two .ALS
  308.                     files (PROGRAM and SCRIPT) in the ROM should not
  309.                     be called explicitly - they are loaded as required
  310.                     according to the alias data. Briefly:
  311.                     The first letter specifies Program or Script
  312.                     (either O or S) - the second letter specifies if
  313.                     RUN is allowed and the next three letters give
  314.                     both the top directory any compiled programs are
  315.                     placed in and also the files extension.
  316.                     A text editor can be started by using the alias
  317.                     character of $.
  318.  
  319. For examples see the enclosed JBT.DBF file for examples of using the
  320. fields. This is actually my configuration file but gives you a clue as
  321. to what to do. The working configuration file should be called
  322. JBTREE.DBF and exist in a directory called JBTREE. This, in turn,
  323. should exist as a sub-directory off the directory in which JBTREE.OPA
  324. exists. It must also be on the same drive.
  325.  
  326. If you are upgrading the program from a previous version then the new
  327. directory will be automatically made and the file moved. If this is a
  328. first installation then you could copy both the .APP and .DBF files to
  329. the same directory and the rest of the creation and moving will be
  330.  
  331. automatic when the program is first run, or you could manually create
  332. the directory and move the file into it.
  333.  
  334. Because I use the Data application to access this file for alteration,
  335. if my file is not used as a starter, then the Field titles will have
  336. to be typed in manually. I have included a JBTREE.DBF file which is a
  337. Data file with just the built-in applications and the field names
  338. included.
  339.  
  340. To use the launch utility place the cursor on the file you require to
  341. view/run and press Psion-V. If the Extension does not exist in the
  342. database then an option to use Word will be given. It is also possible
  343. to force the use of Word at all times by using Psion-Shift-V instead
  344. of Psion-V.
  345.  
  346. Once the file has been opened it must be closed in the normal way for
  347. that program (usually Psion-X) otherwise, once you return to the
  348. System screen, the file will still show as open, but not necessarily
  349. under its normal icon.
  350.  
  351. N.B. There is a problem with any Icon or Title that is normally
  352.      displayed on a status screen when launching programs in this way.
  353.      This is very difficult to solve for every case as, to do so,
  354.      would rely on the program in question having been installed on
  355.      the System screen - those that are should have their icons
  356.      displayed correctly but others will not.
  357.  
  358.      There does not appear to be a way round this problem (unless
  359.      someone knows of a fix of which I am unaware).
  360.  
  361. Hex View/Edit
  362. -------------
  363. To view or edit in a Hex or 'Dump' format then use Psion-H. To exit
  364. from the procedure use Psion-X.
  365.  
  366. Move around the display using the cursor keys and switch between the
  367. Hex and ASCII columns using the Tab key.
  368.  
  369. To toggle between Edit and View use Psion-E. It is possible to edit in
  370. the ASCII display as well as the Hex display.
  371.  
  372. To jump to a new location use Psion-J - the location should be
  373. inputted in Hex digits.
  374.  
  375. To search within the file use Psion-F. If you are in the Hex part of
  376. the display then input Hex characters (0-9,A-F) - the A-F characters
  377. can be typed in lower case - the program will automatically convert.
  378. If in the ASCII section then ASCII characters can be searched for.
  379. Case is important in this instance. To search again for the same data
  380. use Psion-G.
  381.  
  382. A menu similar to the others in this program has now been implemented
  383. which works in the usual Psion way and should be self-explanatory.
  384.  
  385. N.B. For those of you who think in Hexadecimal - the hex figure given
  386.      for the end of the file may appear to be one less than that
  387.      reported on the files list and info. This is because, on the
  388.      HexEdit screen, the first byte is classed as zero rather than
  389.      one.
  390.  
  391. Display
  392. -------
  393. There are two forms of display - one with file information shown and
  394. one without. The font size is altered accordingly and a larger font is
  395. used if the file information is not shown. To switch between the two
  396. formats use Psion-I. If the information is not displayed then
  397. individual file information can be shown by placing the cursor on the
  398. file and pressing Psion-N.
  399.  
  400. The directories and files can either be shown sorted or unsorted. This
  401. toggle is operated by using Psion-S.
  402.  
  403. Both of the above options can be made to be permanent so that the
  404. program always starts up in the same manner by using Shift-Psion-C.
  405. This displays a dialog with the two options. The result of this dialog
  406. is saved in a JBTREE.CFG file in the JBTREE sub-directory.
  407.  
  408. To refresh to display (of use after an alteration which does not
  409. rewrite the screen) use Psion-U.
  410.  
  411. SSD Pack information can be displayed using Psion-F. Please note that,
  412. although information on the Internal drive can be displayed, this may
  413. not be totally accurate in terms of size and amount left as the
  414. internal Ram is dynamically sized according to program requirements
  415. (i.e. the more programs you have running, the smaller the drive will
  416. be). The dialog may take a little time to appear as it has to
  417. calculate reclaimable space.
  418.  
  419. Launch Sub-Menu
  420. ---------------
  421. There is an optional sub-menu available for Launching applications
  422. (APP/OPA/OPO). This option appears on the Sundry Menu and will only be
  423. shown if the file JBTL.OPO is present in the correct directory
  424. (normally JBTREE off the directory in which JBTree resides).
  425.  
  426. On selecting this option (using Shift-Psion-L) a menu is displayed
  427. with up to 40 programs on it. They will be displayed in the order they
  428. appear in the JBTL.DBF database. The final two options on the menu
  429. cards are to return to JBTree or to configure the programs.
  430.  
  431. The configure options are to Add or Edit. Edit will just run the
  432. machine's Data program with JBTL.DBF as the file to launch with. Add
  433. presents a dialog which allows selection of the Application (the
  434. default drive is actually ROM:: although the Drive is shown as
  435. Internal); the datafile (if required); and a key which will appear as
  436. the short-cut key on the menu. To provide a Psion+key short-cut use a
  437. lower case character - Upper case will give the Shift+Psion+key
  438. option. If a short-cut key is chosen that is already in use you will
  439. be thrown back to the dialog, otherwise, on pressing Enter, the new
  440. data is saved to the database and the Menu will be shown again.
  441.  
  442. N.B. At present JBTL.OPO will run as a stand-alone option as long as
  443.      its database is in the same directory. I am examining other ways
  444.      of implementation so there is no guarantee that this stand-alone
  445.      option will exist in future versions.
  446.  
  447. Speed
  448. -----
  449. The program is not the fastest in the world (primarily because it is
  450. written in OPL rather than 'C'). The fastest setup would be with Sort
  451. and File information Off (although Sort does not effect the speed
  452. greatly). To achieve this fastest option - once in the directory tree
  453. press Psion-I and then Psion-S (or use the configuration option so
  454. that the program remembers the setup [^C]). The configuration file
  455. (JBTREE.CFG)  created when using ^C will exist in the same directory
  456. as the JBTREE.DBF file. The directory and file are created if they
  457. don't already exist. The .CFG file is not required for the running of
  458. the program and, if you never press Psion-Shift-C, it will not be
  459. created.
  460.  
  461.  
  462.  
  463. Exiting the program
  464. -------------------
  465. You can exit instantly with Psion-Esc or Psion-X wherever you are in
  466. the program.
  467.  
  468. Limitations
  469. -----------
  470. At present the program is limited to:
  471.                 640 Directories
  472.                 640 Sub-Directories
  473.                 640 Files per Directory
  474.  
  475. If these specifications are insufficient, please let me know - it is
  476. possible to increase them subject to RAM availability (and Operating
  477. System limitations) on your machine.
  478.  
  479. The program uses about 60kb of RAM when running but this is somewhat
  480. dependant on the size of the SSD and the number of directories and
  481. files that are on it as variables are dynamically sized. Because of
  482. this, it is impossible to give accurate estimations of memory usage.
  483. The maximum I have come across is approximately 70kb but, if you have
  484. a larger sum, let me know and I'll update this section.
  485.  
  486. There may be other limitations of which I have not thought - if you
  487. wish to augment this section please contact me by e-mail via the
  488. methods listed at the end of this document.
  489.  
  490. Thanks
  491. ------
  492. Thanks are especially due to Wolfgang Schirmer and also to Tom
  493. Dolbilin, Matthew Millar and Steve Litchfield for their continued help
  494. with my projects and assistance with debugging. Without people like
  495. these my programs would be unusable!
  496.  
  497. Disclaimers
  498. -----------
  499. I presume there are still some bugs as it is a very complex program
  500. with many Procedures. I think I've cleared up most of the nasty ones
  501. though. If you have any questions regarding the operation of the
  502. program I will try to help you and I'm always open to suggestions for
  503. improvements (I reserve the right not to implement them though).
  504. Please report any bugs found as soon as possible so that I might try
  505. to clear them up.
  506.  
  507. As is usual with programs of this sort, I shall not be held
  508. responsible for any loss of data (or damage to the hardware?), however
  509. caused, as a result of using this program. The user must take
  510. responsibility for his actions and uses the program at his own risk. I
  511. reserve all rights of copyright to the program although payment is not
  512. required to use it.
  513.  
  514. Because I now translate the program outside of the S3a environment I
  515. am able to entertain ideas for improvements from users. Previously, I
  516. was very tight for programming space but this has largely been cured.
  517. If you have any suggestions for improvements please contact me via the
  518. e-mail options at the end of this file.
  519.  
  520. Enjoy!
  521.  
  522. Contact
  523. -------
  524. John Boyce
  525. CompuServe: 100014,1240
  526. CIX: jboyce@cix.compulink.co.uk