Answers to Frequently Asked Questions about MacRATS

This page address common questions specific to using RATS on the Macintosh platform.

Questions and Answers

Q1. How can I set the "creator" and "file type" attributes so that files imported from another system will be recognized as RATS program or data files?

A1. For a RATS program file, the appropriate file type is "TEXT" and the creator name is "RATS". For a RATS format data file, use the file type "RTDF" and the creator name "RATD" (this refers to the RATSDATA utility).

RATS user Carl Moss was kind enough to share two AppleScripts he had written to convert the file type and creator tags of files imported from another platform. Carl's scripts and description follow below:

If you copy and paste these into the Script Editor they can be saved as mini applications: all that's necessary to use them is to select a list of files to convert and drag-and-drop the list onto the apps.

This converts to RATS text files:

-- Convert RATS programs from another platform
property fileType : "TEXT" -- text file
property creatorType : "RATS" -- MacRATS
on open (theList)
tell application "Finder"
repeat with theItem in theList
set file type of theItem to fileType
set creator type of theItem to creatorType
end repeat
end tell
end open

This one converts to RATS database type:

-- Convert RATS database files from another platform
property fileType : "RTDF" -- RATS database file
property creatorType : "RATD" -- Mac RATSData

on open (theList)
tell application "Finder"
repeat with the Item in theList
set file type of theItem to fileType
set creator type of theItem to creatorType
end repeat
end tell
end open