home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / mag_discs / volume_9 / issue_02 / keystroke / desc < prev    next >
Text File  |  1995-09-07  |  2KB  |  47 lines

  1. \xxxSTRIP
  2. ---------
  3.  
  4. This useful function takes a single parameter which is either a file name
  5. or a filepath and returns a Keystroke system variable with the PC DOS
  6. type tag removed.
  7.  
  8. Run <Keystroke$Lib>./xxxSTRIP parameter[a]
  9.  
  10.  
  11. For example, suppling 'FILE/TXT' as the parameter will return
  12. KS$Line containing 'FILE' and variable KS$filetype would contain 'FFF'
  13. which is the RISC OS filetype number for a text file.
  14. You could then act upon this returned information in some way.
  15.  
  16. For example:
  17. Set KS$file PICTURE/JPG
  18. or
  19. Set KS$file ADFS::HardDisc4.$.PICTURE/JPG
  20. RUN <Keystroke$Lib>./xxxSTRIP <KS$file>
  21.  
  22. Output is...
  23. KS$Line = 'PICTURE'
  24. KS$filetype = 'C85'
  25. (This is the RISC OS filetype number of a JPEG file) 
  26.  
  27. But we also realise that you may want to change the DOS file into an Acorn filetype automatically. So if you add the letter 'a' to the end of the
  28. parameter and you supply a full pathname (ie ADFS::...) then the file type
  29. will be automatically translated.
  30.  
  31. For example:
  32. Set KS$file ADFS::HardDisc4.$.PICTURE/JPG
  33. RUN <Keystroke$Lib>./xxxSTRIP <KS$file>a
  34.  
  35. The file 'PICTURE/JPG' will be renamed to 'PICTURE' and set to a RISCOS
  36. filetype of JPEG (&C85) automatically.
  37.  
  38. This function also checks to see that if in the renaming process the new
  39. name might match another already present in the same directory.
  40. In these cases the new file gets an extra number added to the end.
  41.  
  42. If you want to edit the DOS types found, it currently acts upon 44
  43. different DOS types, then look inside the '/xxxSTRIP' program for more details. 
  44.  
  45.  
  46.  
  47.