p>. [[CLI Basics part 2|<< Part 2]] | [[CLI Basics|Index ^^]] | [[CLI Basics part 4|Part 4 >>]] --- <div id="toc_heading"></div><div id="toc"></div> h2. Wildcards Several commands (including *Copy) allow you to specify more than one file by using a <i>wildcard</i> in the filename. The available wildcards are: | * | Match 0 or more characters | | # | Match one character | For example: @Fred*@ would match "Fred", "Freddy", "Freda" and "Frederick"; @Fred#@ would match "Freda" but not "Fred", "Freddy" or "Frederick"; @Fred##@ would match "Freddy" but not "Fred", "Freda" or "Frederick". h2. System devices RISC OS contains a number of <i>system devices</i>, which can be used in place of filenames if you want to send (or receive) data to/from somewhere other than a file: | kbd: | The keyboard, reading a line at a time | | rawkbd: | The keyboard, reading a character at a time | | vdu: | The screen | | rawvdu: | The screen, bypassing [[GS Translations|GSRead]] conversion | | serial: | The serial port | | printer: | The printer | | null: | The null device, which discards all output | For example, you can use the *Copy command to send a file to the printer: @*Copy MyFile printer:@ Alternatively, you may want to run a command but are not interested in any screen output. This can be done by redirecting output to the null device: @*MyCommand { > null: }@ For a full list of system devices, see [[SystemDevices Technical Details]]. h2. Filetype declarations Command aliases were mentioned in [[CLI Basics part 2|part 2]]. Another special type of alias is used to declare the default action to be taken on encountering a filetype. These take the following forms: | @Alias$LoadType_XXX@ | Specifies the action to be taken when a file of type XXX (in hexadecimal) is loaded | | @Alias$RunType_XXX@ | Specifies the action to be taken when a file of type XXX is run | Most of these declarations are only of use in the desktop, but a handful are also relevant while in the CLI. For example, the default settings for filetype FFE are: @Alias$RunType_FFE Exec %0@ which means that, if a file of type FFE is entered as a command at the star prompt, the action taken will be to [[*Exec]] the file. h2. System path variables The way RISC OS searches for files or commands is controlled by the system variables <i>File$Path</i> and <i>RunPath</i>, as follows: | @File$Path@ | The list of directories that RISC OS searches when looking for a file. | | @Run$Path@ | The list of directories that RISC OS searches when looking for a program to run. | Each entry in the path contains a directory name followed by a full stop. Entries are separated by commas; two commas in a row are treated as a null entry (i.e. the currently selected directory, also known as CSD). Hence a run path of @Boot:Library.,,%.@ would cause "Boot:Library" to be searched first, followed by CSD and finally "%" (i.e. the current library directory). There are occasions when you may want to change these settings. For example, if you wanted RISC OS to search @$.MyLibrary@ in addition to the other directories in Run$Path, you might use: @*Set Run$Path <Run$Path>,$.MyLibrary.@ For more information on File$Path and Run$Path, see [[FileSwitch Paths To Search For Files]]. h2. Further reading * [[System Variables]] in the Programmer's Reference Manual. --- p>. [[CLI Basics part 2|<< Part 2]] | [[CLI Basics|Index ^^]] | [[CLI Basics part 4|Part 4 >>]]