index   prev   next RISC OS Notes

File Names, Types
Dates and Renaming

Path names short cuts

use *set path to create a shorthand symbolic name for a file path. eg1 *Set temp$Path RAM::IYO_RAM.$.ephemeral this creates a path variable:- temp: which points to a directory in the RAM disk.You can then refer to files by prefixing them temp: to view a path variable eg choices: use - Show choices$path to view all path variables: use - Show *$path eg2 *set temp$Path ADFS::Panto.$.SCRAPS *filer_OpenDir temp: (a viewer opens for the SCRAPS directory) eg3 Path rotorChoices Choices:rotor (Path is an alias for Set %$Path) Then filer_opendir rotorChoices: opens Config in Boot:Choices:rotor

# !Rename renaming files

*** Use Preview before renaming The Target will use the fields generated by the Prototype matching to generate the output filename. These fields are the strings that are matched by each wildcard (or repeated wildcard) in the source eg !icon then drop files on, then >pattern .. add dos extension >b rename (it works out DOS ext itself) There is a stronghelp manual and a text help file see manuals in DOCZ - extract follows:- add suffix to unsuffixed files Prototype : ^. Rename To : &1/jpg result - 2007 becomes 2007/jpg Insert a character in a fixed length file name Prototype : .......^. Rename To : &1&2&3&4&5&6&7x&8 result - IMG_123/JPG becomes IMG_123x/JPG Remove a character from a file name Prototype : ^._..^. Rename To : &1_&2&4 result - songs_tx/html becomes songs_t/html Insert a character in a fixed length file name -alternative Prototype : ^._.^. Rename To : &1_&2x&3 result - songs_t/html becomes songs_tx/html Overwrite a character in a fixed length file name Prototype : .... Rename To : &1&2m&4 result - area becomes arma Prefix filename with a character Prototype : ^. Rename To : 4&1 result - abcdefg/jpg becomes 4abcdefg/jpg Remove prefix from filename Prototype : IMG^. Rename To : &1 result - IMG12345/JPG becomes 12345/JPG note: the &1 matches the wildcard string ^. not the IMG literal. so: Prototype : [_]^. Rename To : 19&1&2 result - _G12345/JPG becomes 19_G12345/JPG replace any name with a prefix, a number, and add extension (set Digits 2 to get leading zero) (&0 is Sequence - set for for starting number) Prototype : ^. Rename To : p&0/jpg result - abcdefg/jpeg becomes p01/jpg result - avdtb1cdefg/jpeg becomes p02/jpg Remove DOS extension and set type Prototype : ^./^. Rename To : &1 **** tick the set type button Add DOS ext to a RISCOS filename (mixed group of JPEGs, GIFs) Prototype : ^. Rename To : &1/&D **** don't forget the / Rename files of form PICT3016.jpg to KRIS3016 (remove ext) Prototype : ^P^I^C^T........ Rename To : KRIS&1&2&3&4 or Prototype : ^P^I^C^T........ Rename To : KRIS&1&2&3&4&5&6&7&8 keeps extension or Prototype : ..^I^S....... Rename To : &1&2CR&3&4&5&6 26IS1234/JP > 26CR1234 : ........ : &n/JPG 26CR1234 > 26CR1234/JPG *** but : ^. : &n/JPG 26CR1234 > 26CR1234/JPG (any length name) : ........ : &1&21&3&5&6&7&8 26CR1234 > 261C1234 Lower casing Prototype : ^. Rename To : &1 use popup menu to set all files to lower case # > I had hoped to use !Rename to do the prefixing but it has no way of > specifying the sequence of the input files. Using Rename 3.21 (June 2008), a selection of files, dragged to the Rename icon, is processed in the current filer order. Tony Moore

# - Types

Well documented in StrongHelp Manual - Filetypes some documentation in the UserGuide:- DOCS.UGUIDE37.BOOKB.TOC.HTM - appendix E Mimemap is in:- !Boot.Resources.!Internet.files.MimeMap To see file types use *mimemap to find a RISCOS filetype for a MS filetype eg .WAV *mimemap kill task F2 wav (answer audio/wav xFB1) rtf is &C32 First 6 characters of an RTF files must start with:- {\rtf1 If there is a blank line at the start delete it. or use *show file* or use Director

# - Names and sorting

Sorting for Thump and Variations differs from filer sort Sort by name (filer) is the same >>Display>Sort>Native

# DATES on FILES

PC files have 3 dates:- Modified-W Accessed-R Created-C VM mini disks files have 1 date Modified-W VM SFS files have 3 dates :- Modified-W Accessed-R Created-C Files transferred to the PC using PCOM >>Transfer>Receive have all three dates set to the current date.

© JR 2013