h6. [[FileSwitch]] h6(. » [[FileSwitch Technical Details|Technical Details]] h6((. » Use of File Types h2. Use of File Types h2(#determine). Determine the Action to Perform As discussed in the "key features":link3 section on FileSwitch, a 3-digit hexadecimal value is used to represent the file type. It is the file type that determines the action that must be performed on a file. When a date stamped file of type _xxx_ has an action of [[*Load|*Load]] or [[*Run|*Run]] performed on it, FileSwitch carries out several steps to determine what it should actually do. The steps are: # Look for the system variables <code>Alias$@LoadType_</code>_xxx_ or <code>Alias$@RunType_</code>_xxx_ respectively. # If variable of string or macro type exists, then it is copied (after macro extension), and the full pathname is used to find the file on either File$Path or Run$Path # Any parameters passed are also appended for [[*Run|*Run]] commands # The whole string is passed to the command Line interpreter using [[OS_CLI|OS_CLI]] h2(#example_loadtype). An Example of using LoadType |_\2<^. File Details| |<^{width:6em}. CSD|<^. <code>adfs::HardDisc.$.Photos.Wedding</code>| |<^. Command|<^. <code>*LOAD Photo001</code>| |<^. File type|<^. &FF9, Sprite (bitmap)| |_\2<^. Step 1 - Find system variables| |<^. Variable|<^. <code>*@LoadType_FF9</code>| |_\2<^. Step 2&3 - Use full pathname + parameters| |<^. Issues command|<^. <code>*@LoadType_FF9 adfs::HardDisc.$.Photos.Wedding.Photo001</code>| |<^. <code>Alias$@LoadType_FF9</code>|<^. has a value of <code>SLoad %*0</code> by default| |_\2<^. Step 4 - CLI issues command| |<^. Output|<^. <code>*SLoad adfs::HardDisc.$.Photos.Wedding.Photo001</code>| h2(#example_runtype). An Example of using RunType <table><tr><th colspan="2">File Details</th></tr> <tr><td>CSD</td><td><code>adfs::HardDisc.$.Programs</code></td></tr> <tr><td>Command</td><td><code>*RUN BasicProg p1 p2</code></td></tr> <tr><td>File type</td><td>&FFB, BASIC</td></tr> <tr><th colspan="2">Step 1 - Find system variables</th></tr> <tr><td>Variable</td><td><code>*@RunType_FFB</code></td></tr> <tr><th colspan="2">Step 2&3 - Use full pathname + parameters</th></tr> <tr><td>Issues command</td><td><code>*@RunType_FFB adfs::HardDisc.$.Programs.BasicProg p1 p2</code></td></tr> <tr><td><code>Alias$@RunType_FFB</code></td><td>has a value of <code>Basic –quit |"%0| %*1</code> by default</td></tr> <tr><th colspan="2">Step 4 - CLI issues command</th></tr> <tr><td>Output</td><td><code>*Basic - quit "adfs::HardDisc.$.Programs.BasicProg" p1 p2</code></td></tr> </table> h2(#default). Default Settings The filing system manager sets several of these system variables by default; however, they can be changed easily. This is useful say, if a newly installed application wants to be responsible for loading files of a certain type. Setting a file of a specific file type can easily be achieved by using the [[*Set|*Set]] command. A simple example of this is command is provided below. <code>Set Alias$@LoadType_007 SpyApp %*0</code><br /> <code>Set Alias$@RunType_007 SpyApp %*0</code><br /> [link3]FileSwitch%20Key%20Features#file_type