home *** CD-ROM | disk | FTP | other *** search
- FileUtils version 4.07 12/12/92
- by Ben Summers
-
-
- FileUtils version 4
- ~~~~~~~~~~~~~~~~~~~
-
- *Command menu for files with find file, find space, change type windows,
- parameters, set dir and forget disc utilities.
-
- Click here for conditions of use & distribution.
-
- Please note my address has changed.
-
- FileUtils now needs the latest version (3.75) of CLib. You should all have
- this by now, but if you haven't, write to me.
-
- If you think of any more utilities which might be useful or use FileUtils a
- lot, please write and tell me.
-
- Note on True count
-
- The application directory should contain the following files:
- !Boot !Help !Run !RunImage
- !Sprites FUhotkey Help HelpReader
- HelpText Templates StartHK
- and the directory SetUp, which should contain
- ffChoices FileData Options
-
- Revision history
- ~~~~~~~~~~~~~~~~
- Version 1.00
- Original BASIC application.
-
- Version 2.00 - 2.06
- Optional file menu commands added, bug fixes.
-
- Version 3.00
- BASIC application rewritten in C.
- Utilities added.
-
- Version 3.01
- Find file user interface changed after comments from Acorn.
- Fix FileCore option removed after complaints from Acorn (dismount discs
- when you have finished with them).
- Interactive help is now fully supported.
-
- Version 3.02
- Return now starts the search in the Find file window.
- Hotkeys now added.
- Code improved.
-
- Version 3.03
- Find file improved.
- Archive searching added.
- Hotkeys now work 'outside' the application.
- The options are now a submenu.
-
- Version 3.04
- Bugs corrected.
-
- Version 4.00
- More bugs corrected.
- Context sensitive HelpReader system used.
- Outside hotkeys removed.
- Parameters utility added.
- Set dir utility added.
- Minor improvements to templates.
- Improved FileData file.
-
- Version 4.01
- Changed find file progress window.
- Find file now preserves parameters and paths between each use.
-
- Version 4.02
- Kill dialogue box now shows object name.
- Short cuts added to iconbar menu.
-
- Version 4.03
- Save find file options and paths option added.
- Re-implemented the outside hotkeys (but in a different way: )
- Added Forget disc utility.
- Support for new format archives.
- Modified way filenames too long appear in file list window.
-
- Version 4.04
- Corrected new archive searching to cope with converted archives.
- Modified find space to take account of wasted disc space.
- Opening of archives in the file list window.
-
- Version 4.05
- Fixed small bug with default paths.
-
- Version 4.06
- Clicking on FileUtils icon now brings up last used utility.
- 'Error in archive' message now shows archive name.
- Directory structure changed slightly.
- Added True count utility.
- Added Set dir dialogue box for quicker setting of the current directory.
-
- Version 4.07
- Added saving of found list in find file
-
-
- How to use FileUtils
- ~~~~~~~~~~~~~~~~~~~~
-
- @*filemenu
- File menus
- ~~~~~~~~~~
- Drag a file to the iconbar. A menu of * commands will pop up. Chose one, or
- click elsewhere to cancel it.
- At the top of the menu, there will be up to four optional items, depending
- on the options set up. They can be:
- Change type ⇨ Leads to a submenu allowing you to change the files filetype.
- Dump Dump the file
- Info Get info on the file
- Kill Deletes the object (file or directory) even if it is
- locked. This is useful for getting rid of applications or directories where
- somebody has locked a file inside it (annoying isn't it?). As it is quite a
- dangerous option, there is an option to confirm that you want to kill the
- object before you do so.
-
- See the format of the FileData file for how to define the other
- options.
-
- Interactive help
- ~~~~~~~~~~~~~~~~
- To save space, the help text is only loaded in when it is needed, so when
- you first point at FileUtils, it will access the disc to get this text.
- How to easily add interactive help to your C programs.
-
- Hotkeys
- ~~~~~~~
- Each of the utilities has a keyboard shortcut. Shift-Ctrl function keys have
- been used to avoid clashes with other applications. See the info on each
- utility for its hotkey.
-
- The hotkeys can be made to work outside the application so that if one of
- the hotkeys is used, FileUtils will be loaded and the relevent utility
- started. To make this work, you must add the following line to the desktop
- command file (the one in the command 'desktop -file <filename>' {page 390
- RISCOS2 user guide}) in your boot routine:
-
- adfs::HardDisc4.$.Utilities.!FileUtils.StartHK
-
- You will, of course, have to change the path to the directory FileUtils is
- in. This method is only really useable for hard disc users, but then, these
- hotkeys are probably only suitiable for them.
-
-
- The main menu
- ~~~~~~~~~~~~~
- Main menu (click Menu on the icon)
- Info ⇨ Leads to standard info dialogue box.
- Options ⇨ Leads to options submenu
- Save options Saves the current options to disc
- Help Loads this text
- *Cmd menu Just a reminder...
- True count Open the true count window
- Forget disc Opens the forget disc dialogue
- Set dir Toggles the set dir utility
- Parameters Opens the parameters window
- Change type Opens a change type window
- Find space Allows you to find a disc with enough room on it
- Find file Opens the find file window
- Quit Guess
-
- One of the utilities will have a grey background on the menu instead of the
- normal white background. This is the utility that will be started when the
- FileUtils icon is clicked.
-
-
- Options ⇨
- ~~~~~~~~~~
- This leads to a submenu which allows you to set which optional items appear
- on the file menus. Use the 'Save options' on the main menu to save these to
- disc.
-
- True count
- ~~~~~~~~~~
- Hotkey: Shift-Ctrl-F8
-
- This utility allows you to see how much space an object really takes up on
- your disc. This is provided because the Count option on the Filer doesn't
- give the true amount of space used. All it does is total up all the lengths
- of the files. This gives a false impression of the space used up for two
- reasons. Firstly, a file can take up more than its lenght because it must
- fit into an exact number of sectors. These are about 512 bytes long. If a
- file is 513 bytes long, an extra sector has to be used to store the 513th
- byte, so in fact the file takes up 1024 (1K) up on the disc. The Count
- command does not take this into account. The second reason is directories.
- These are ignored by the Count command. However, each one takes up 2K on the
- disc. Because of this, the count command gives an inaccurate result.
-
- For a demonstration of this, count all the files on a disc, preferably a
- hard disc. Next use the 'Free' option to find out how much has been used.
- Compare the two - count will give a smaller result.
-
- True count will show how much space an object actually takes up on your
- disc. To use it, open the true count window using the iconbar menu or the
- hotkey. Next drag the object to this window. The size will be shown.
-
- The window has two other icons, the Reset size and Add sizes icons. The
- reset size resets the size shown to 0K. The Add sizes icon is useful when
- you are dragging a directory full of objects to the window. With out this
- icon selected, each object would be counted, and the value displayed.
- However, the next object would over write this value. To stop this, select
- this icon. Now whenever an object is dragged to the window, it's size will
- be added to the size shown. Use the Reset size icon to put this back to
- zero. Use this icon when you drag more than one object from a directory at
- once onto the window.
-
- Note on True count
-
- Forget disc
- ~~~~~~~~~~~
- Hotkey: Shift-Ctrl-F7
-
- This utility allows you to forget a disc like dismount, but also unsets any
- system variables which reference it. This should stop any requests for a
- disc (which you sometimes get even after dismounting it from the disc drive
- icon menu). To use it, select it from the icon bar menu or use the hotkey.
- Click on the icon of the drive with the disc in that you want to forget, set
- the options and click on OK.
-
- The options allow you to select which system variables to get rid of. The
- 'Forget paths' option also checks the system variable 'Wimp$Scrap'.
-
- Set dir
- ~~~~~~~
- Hotkey: Shift-Ctrl-F6 (toggles utility on/off)
-
- This utility allows you to set the current directory from the desktop. Just
- drag the Set dir icon from the left hand side of the iconbar onto the
- directory which you want to be set as the current directory. A dialogue box
- will pop up confirming that the current directory has been set.
-
- If you want to use the Set dir utility just once, you may find that it is
- more convient to use the dialogue box hanging off the iconbar menu for the
- Set dir utility. Just drag the icon to the directory just like you would
- with the iconbar version.
-
- Parameters
- ~~~~~~~~~~
- Hotkey: Shift-Ctrl-F5
-
- This option allows you to run or load a file or application with parameters.
- For example, you might want to load FileUtils from the command line with the
- FindFile window open (this is an example - I'm sure you would not want to
- load FileUtils from FileUtils!). To do this you would use the command
- *Run !FileUtils -f
- However, you cannot do the same thing in the desktop. The parameters utility
- allows you to do this.
-
- To use it, select it from the main menu or use the hotkey. Drag the file or
- application of the window, and it's name will appear before the parameters
- writeable icon. If you click on the white icon at the far left of the
- window, it will toggle the command type between *Run and *Load. Type the
- parameters into the writable icon. If you drag a file into the writeable
- icon, it's full filename will be inserted at the caret. To run the command,
- press [Return] or click OK. The command will be executed, and the parameters
- window will be cleared. Click OK with adjust to execute the command and
- preserve the windows contents.
-
-
- Change type
- ~~~~~~~~~~~
- Hotkey: Shift-Ctrl-F4
-
- This option opens a change type window. Before you can use it, you must
- first set up the filetype by clicking menu on the window, and choosing a
- filetype, or typing one it at the bottom of the menu. Then select all the
- files you want to set to that filetype, and drag them to the window. This is
- useful, for example, when you have just transferred files from another (non
- Archimedes) computer and they are all filetyped Data. Please note that this
- option is only worth it for lots of files - if you have just one, drag it to
- the icon on the iconbar, and choose a filetype from the Change type submenu
- of the file menu.
-
- Find space
- ~~~~~~~~~~
- Hotkey: Shift-Ctrl-F3
-
- This option allows you to find a disc with some space on it (for when you
- want to find a disc to copy something onto). Fill in the box for how much
- space you need or drag the file, directory or application to the window to
- add that objects size to the number in the box. Set up the drive you want to
- search in, and click on OK. The disc in the drive will be checked, and then
- you will be prompted for more discs until a disc is found with enough space.
-
-
- Find file
- ~~~~~~~~~
- Hotkey: Shift-Ctrl-F2
- In the window: Ctrl-E: set exact searching
- Ctrl-C: set containing searching
- Ctrl-P: restore previous name
- Return: start search
- Escape: close window
-
- This option opens the Find File window. Fill in the name, select the paths
- to search, and set the options. Click on OK to start. Searching is case
- insensitive and multi-tasking.
-
- If you drag a file or application to the window, then the path of the
- directory it is in will be added to the list of paths. When a directory it
- dragged to the window, it will be added to the list of paths. If a path is
- not necessary (for example there is a path nearer the root directory in the
- list), it will not be added and the computer will bleep. If there is a path
- further away from the root directory in the list, then it will be removed.
- Click menu over the list to remove a path or clear all the paths. A
- horizontal scroll bar will be added to the list if necessary. Drag a file or
- application from the root directory of the disc to search the entire disc.
-
- When you start the search, a window will open allowing you to stop the
- search, and giving you some infomation on how it is getting on.
-
- If no files are found, the findfile window will reopen with all the options
- and paths set up.
-
- If you selected the list files option then when a seach has finished, a list
- of files found will be opened. Double click with select on a item to open
- the directory viewer the item is in. Applications are shown in red,
- directorys in blue, and files in black. If a item is in an archive its
- filetype is shown in light blue, and when it is double clicked on the
- archive will be opened and the directory viewer will be displayed if ArcFS
- is loaded. If it is not, the directory viewer that the archive is in will be
- opened. Click menu on this window to save the find list.
-
- If you selected many discs searching, you will be prompted to insert more
- discs until you click on Stop on the dialogue box which asks you for another
- disc. No check is made to see if the disc has been seen before by the
- search.
-
- The paths you set are kept between each time you use the find file utility,
- and the options are the ones which were set last time you clicked on OK.
-
- Use Interactive Help to get more information about the options.
-
- If you find that you are searching on the same path every time you use this
- utility (for example the root directory of your hard disc), you can save the
- paths and some of the options to disc so that they will be the options and
- paths set up every time you run FileUtils. Click menu over the find file
- window and select 'Make defaults' to set these.
-
- Searching in Archives
- ~~~~~~~~~~~~~~~~~~~~~
- FileUtils can search in any Spark archives it finds, new and old formats.
- Select the 'Search in archives' options to enable this.
-
- To make your own archives, contact David Pilling for a copy of Spark or
- ArcFSr/w. I strongly recommend that you buy a copy of ArcFSr/w. It is a very
- neat bit of coding, and provides easy to use compression for a nominal
- price.
-
-
- Note on True count
- ~~~~~~~~~~~~~~~~~~
- True count askes RISC OS how much space each file takes up on a disc, and
- uses the size for directories give by it. However, in some cases, this
- figure is inaccurate. Usually, it is very close - I have never found the
- final result to be more than 2k out. Still, it is still much better than
- Count.
-
- I am investiagating this problem. Perhaps users of FileUtils could report
- the sucess or otherwise of this utility on their systems. Please write and
- tell me the size True count thought it was, and the size it actually is.
- Also details of which filing system used and the machine and operating
- system version.
-
- To find out how much space an object takes up, use the Free option from the
- Filer iconbar menus. Note the free space. Next copy the object, and note the
- free space again. Subtract the first result from the second one. If you are
- using RISC OS 2, the result will be in bytes. Divide this by 1024 to get the
- result in Kbytes. If you are using RISC OS 3, the multitasking Free utility
- will give the free space in Kbytes if there is less than around 2Mb free.
-
- I included this utility in this version for two reasons. Firstly, this
- utility still is accurate. The problems I have had may be because of RISC OS
- 3.00 (included in the A5000). This version is at best a beta-test version of
- RISC OS, and the version supplied in the A4 portable (3.10) has just about
- all of the modules updated. This utility may work fine under RISC OS 2.00
- and 3.10. Feedback please!
-
- Secondly, by including this version, and hopefully getting some reponse from
- users, I can find out what the problem is.
-
-
- The FileData file:
- ~~~~~~~~~~~~~~~~~~
- This file tells FileUtils what *commands to put in the file menus.
-
- The format of this file is quite simple, but for those of you too lazy to
- work out what it is, here is a description of each line:
-
- Each line describes a menu for one filetype, or is a comment. Comment lines
- begin with a '\'. The last line must be the XXX entry for filetypes not
- described before. The format of a menu is:
-
- FileType number,Title of menu,First item to appear on the menu,*command,
- other entries of item and *commands,
-
- The line must finish with a comma. The *command may have a '#' in it, which
- will be replaced with the full name of the file when the item is selected.
- Don't put extra spaces in. Please note there is no error checking on the
- FileData file.
-
- If you make an interesting modification to the FileData file, please send me
- a copy of it.
-
-
- Stupid jokes
- ~~~~~~~~~~~~
- Q. What's the difference between an IBM salesman and a herring?
- A. One has scales, is slimy and smells funny. The other is a fish.
-
- Q. What's the difference between an dead IBM salesman lying in the middle of
- a road and a dead snake lying in the middle of the road?
- A. There are skid marks in front of the snake.
-
- IBMs definition of an optional extra: Something essential which isn't
- supplied with the machine.
-
- The Amiga.
-
-
- Twilight
- ~~~~~~~~
- Do you worry about images being burnt into your monitor?
- Do you use confidential data on your machine?
- Do you want pretty patterns to be displayed on your screen when you are not
- using it?
-
- If the answer to any of these questions is yes, then you need to buy a copy
- of Twilight, my first commercial program. Basically what it does is blank
- your screen and display an effect on it when you are not using it. This
- saves your monitor from image burn in.
-
- It also has a password feature to stop unauthorised users looking at you
- data while you are away from your computer, and a hotkey for instant
- blanking of your screen. This is useful for keeping prying eyes away from
- your data.
-
- Twilight also has lots of effects, from memos to fish to shapes to
- rectangles. It will display just one, or a random selection.
-
- Twilight costs £14.95 from:
- The Really Good Software Company
- 39 Carisbrooke Road
- Harpenden
- AL5 5QS
-
- This is the correct price and address. Some early versions of the Twilight
- demo have a more expensive price and a different address.
-
- Please write to me if you would like a demo version.
-
-
- ****
- By the way, try light blue (colour 15) on black (colour 7) in Edit. Much
- nicer than black on white.
- ****
-
-
-
- Credits
- ~~~~~~~
- Thanks are due to the following people for finding bugs and/or making
- suggestions about FileUtils:
-
- Ben Harris Andrew Cawte Brian Sherwood Alex Crawford
- Ian Ford
-
- Also Mark Smith for his help with archive searching.
-
-
- FileUtils source code
- ~~~~~~~~~~~~~~~~~~~~~
- I may be prepared to release the source code of FileUtils to certain people.
- However, they would have to abide by the following conditions:
-
- 1. The source code is not distributed - I would like to keep track of
- where it gets to.
- 2. The source code is not modified, and a modified version of the source
- code or a compiled version of FileUtils is not distributed.
- 3. Bits of the code are not used in other programs without my consent
- and an acknowledgement of this in the documentation.
-
- FileUtils is written in C using the RISC OS Library supplied with Acorn
- Desktop C. If you want to see it, please tell me why, and explicitly state
- that you will not break the conditions above.
-
-
- Conditions of use and distribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This application may be freely distributed for no commercial gain. A small
- charge may be made for media etc. The copyright of this application remains
- mine at all times. I would like to hear from any PD library which
- distributes FileUtils so I can provide a copy of the latest version.
-
- If you find that you use this application often, I would appreciate a letter
- telling me so and perhaps a disc of PD. If you include return postage and a
- disc I will send you the latest version. You could even make suggestions for
- new features or improvements, and I might add them to FileUtils.
-
-
- The author:
- ~~~~~~~~~~~
- If you have any comments to make, bugs (what?) to report or new features to
- suggest, please write to me. My address is:
-
- Ben Summers
- 1 St Clements Hill
- Norwich
- NR3 4DE
-
- email: bsummers@cix.compulink.co.uk
-
-
- If you write, please send a SAE for a reply. If you send a disc with your
- letter, I will copy the latest version onto it, and send it back in your
- SAE. If you are sending a disc, wrap it so it doesn't get broken in the
- post, but not so that it can withstand nuclear attack.
-
- If you find this program useful, please send me a token of your
- appreciation, for example a disc of PD programs (which I will send back if
- you send an SAE), as many hours of work have gone into writing this program.
-
- Most of the modifications to FileUtils have been done because someone wrote
- to me and suggested it, so if you would like to see a new feature please
- write and suggest it.
-
- Thanks to everyone who has sent me a letter and a disc - it's much
- appreciated.
-
-
-