index   prev   next RISC OS Notes

* CLI * star commands


cat type list CD CD dir CD.. CD .. dir ^ chmod chown clear CLS basic >CLS >QUIT cp COPY copy rm DEL delete ls DIR cat | ex | lcat ls D: drive n mv | rename RENAME rename mkdir mkdir cdir eg CDFS d: drive :0 dir ex cd mydir dir mydir Useful alias for those swapping between systems or new to RISC OS: set alias$cd if "%0"=".." Then Up Else If "%0"="-" Then Back Else Dir "%*0" Bryan Hogan

# documentation

"Starcmds" StrongHelp manual and PRMs This thread lists most of the star commands

direct command output to file pipe redirection

syntax of a redirection specifier is: { redirection_command [redirection_commands] } where each redirection_command may be any of: > filename Output goes to filename < filename Input read from filename >> filename Output appended to filename Note there must be exactly one space between each element eg *show alias$@run* { > xxx }

# star commands in BASIC

OSCLI accepts BASIC variables. * commands won't. eg 10730 *SSAVE MySprites.SpriteFile 10730 OSCLI("SSAVE " +name$) are the same eg a$ = "SetType " + destfile$ + " Text" OSCLI a$ see BASIC section for more detail

# Catalog related *commands

set the filing system with one of:- ADFS CDFS RAM ... there may be others *Cat lists all objects in a directory (by default the current dir) lots on a line (like DOS dir /w) *CDir creates a directory with the specified pathname *Dir selects a directory (default the user root) as the current directory on a filing system. *EnumDir creates file of object leafnames from that match the wildcarded pattern (by default `*'). eg enumdir temp xxx * creates file xxx containing names of files in dir temp see also !Enumdir which gives dragondrop interface *Ex lists all objects in a directory (default current directory) together with their corresponding file information. (one per line) [*rex] similar to *ex but offers recursion and write to file absolute program lives in boot.Library author: Nick Roberts (Tigger) rex -help will show options *LCat lists all the objects in the named library subdirectory (default the current library). *LEx lists all the objects in the named library subdirectory (by default current library) with their file information. *Lib selects directory (default is filing system dependent) as current library on a filing system. *NoDir unsets current directory. *NoLib unsets library directory. *NoURD unsets User Root Directory (URD). *Sound cant get it to work - investigate *Up moves current directory up directory structure by specified number of levels. *URD sets the User Root Directory (URD). If no directory specified, URD is set to the root directory.

# debug

*where gives location after an abort eg *where Address 00032224 is not in any module dump trace *btsdump -h BTSDump 0.48 (25 Oct 2006) © Justin Fletcher, 2005-2006 The *BTSDump command is used to show the BackTrace Structures present at time of last abort. Probably better to Reporter now.

# help

from a Task window type:- help xxx. for help on anything beginnning xxx eg help font. *help fileswitch gives useful commands for examining a disk Commands provided: Access Cat CDir Copy Count Dir EnumDir Ex FileInfo Info LCat LEx Lib Rename Run SetType Shut ShutDown Stamp Up Wipe Back URD NoDir NoURD NoLib note: stamp command uses the current date & time use !ObjecTime for a user defined stamp or !Stamper to stamp using the date and time of another file

# misc

*- Filer_OpenDir see J1.!jrdesk for examples note:- filer_opendir <choices$write> will open the Boot:choices window (key as above with <>s) From 14.6, Learner's column The position on screen is specified by: x-coord of window - top left in OS units y-coord of window - top left width of window - optional height of window - optional Eg. Filer_OpenDir ADFS::HardDisc4.$ 10 2400 - top left corner of screen on Iyonix Or: Filer_OpenDir ADFS::HardDisc4.$ 100 800 500 400 Flags: -si - show small icons -li - show large icons -fi - show full info -sn - sort display by name -st - sort display by type -sd - sort display by date -ss - sort display by size Hint if you want to open a window with some part of it off screen then issue the Filer_OpenDir command twice, as in my desktop obey file:- | window position top right small icons Filer_OpenDir ADFS::HardDisc4.$ 2990 2360 200 1200 -si Filer_OpenDir ADFS::HardDisc4.$ 2990 2360 200 1200 -si Note - this has effect that other windows opened from this folder will open partially off screen too. This may not be bad as almost invariably I have to move new windows from where RISCOS chooses to put them anyway. *free shows free space on disk - eg *free Bytes free &00000010D6B1C000 = 70,626,416K bytes Bytes used &00000001CD476000 = 7,557,592K bytes *fx0 RISC OS 5.11 (22 Feb 2006) RISC OS 5.16 (18 Jan 2010) *If eg if x=1 then Cat else Show x *namedisc for usb pen drives Try 'Fat32FS:Namedisc 0 newname' where 0 is the relevant SCSI drive. *PCIDevices No. Bus Dev Fun Description 1 0 4 0 Intel 82540 Gigabit Ethernet controller 2 0 6 0 NVidia GeForce FX 5200 3 0 7 0 NEC Open HCI USB Controller 4 0 7 1 NEC Open HCI USB Controller 5 0 7 2 NEC EHCI USB controller 6 0 8 0 HiNT HB2 PCI-to-PCI bridge 7 1 1 0 Acer M5451 AC'97 controller 8 1 2 0 Acer M1535+ south bridge 9 1 3 0 Acer M5457 software modem interface 10 1 11 0 Acer M5229 ATA controller 11 1 12 0 Acer M7101 power management controller * *Pin object x y adds a file, application or directory to the desktop pinboard at the given coordinates *RMEnsure checks that a module is present and is the given version or more recent. The command is executed if this is not the case. *RMEnsure <module_title><version_number> [<command>] eg1 RMEnsure DDEUtils 1.53 RMLoad System:Modules.DDEUtils *set alias can be used to create an abbreviated command eg1 *set alias$tidy run ADFS::HardDisc4.$.Apps.T1.tidy.tidy %*0 then:- tidy xxxx/htm .... Note alias is an alias:- Alias$Alias : Set Alias$%0 %*1 thus: alias wot? status sets up wot? to invoke a status command. or: alias w21 wimpmode 21 *Set Alias$@RunType_b60 /<Obey$Dir> to make PNG files open automatically in Paint Add the above line to the !Boot file of !Paint. *Set <varname> <value> - set system variable BE CAREFUL not to leave trailing blanks on line eg1 *set jr$ "panther" (similar to LET jr$="panther") eg1 *set jr$ panther (same as above) *Set 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 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 *seteval (varname> eg1 *seteval jr$ "pan"+"ther" *SetType xxx text (but see OSCLI) *share to share the root of the A9Home HardDisc4 with new name *IDEFS *share $ A9HD4 - for sharing RAM disk *ram *namedisc 0 Ra *share $ *adfs *share temp *Show *FWshow freeway show ----- *Show displays the name, type and value of system variables matching name given. If no name all variables are displayed. eg1 SHOW eg2 SHOW file$type* shows all File$Types eg3 SHOW inet* shows Inet$ variables eg3 SHOW copy* Copy$Options : A C ~D ~F ~L ~N ~P ~Q ~R ~S ~T V the copy$Options are not affected by configuration filer copy option *showregs Register dump (stored at &0210FC3C) is: R0 = 00000004 R1 = 5900B1A1 R2 = 00000043 R3 = 59009C71 R4 = 00000002 R5 = 00000000 R6 = 26249671 R7 = 00000008 *Taskwindow eg1 TASKWINDOW *ex - opens a task window and shows result *Unset - removes a variable from pool eg unset Webgen2$Running *Unplug The unplug bits stored in the CMOS refer to module numbers, but different OS's have different modules at those numbers, so unplugging module X on one, can result in module Y being unplugged when another is loaded. When changing OS's you should really clear the CMOS (power up with R pressed) or very carefully review all the settings each time. druck *wimpmode see UG 3.7 pages 425:429 some modes wimpmode 21 640 x 512 256 colours wimpmode 32 800 x 600 256 colours *wimpmode X1600 Y1200 C32K EX1 EY1 F60 for Illama *wimpmode X1920 Y1200 C16M EX1 EY1 F60 for Acer

© JR 2013