AppleScripts
Files which are generated on Windows or Unix computers sometimes
have names too long for the Mac's 31-character filename limit. This can
be the case, for instance, with sequencing or genotyping trace files
that come back from the Sequencing Facility. The following scripts
help you change a folderful of file names on a Mac, using AppleScript.
The first three were created by the folks at Apple Computer and may not
work on anything but OS X; the fourth
is my own modification of a script created by someone at Applied
Biosystems, I believe.
- AddToFileNames.scpt.txt
Adds a prefix or suffix to
filenames.
- ReplaceText.scpt.txt
Replaces selected text in filenames.
- TrimFileNames.scpt.txt
Trims a given number of characters from
the beginning or end of filenames.
- SetCreator-TypeToABI.scpt.txt
Changes creator and type of all
files in a folder to something that lets the file be opened with a
double-click. Uses the file's three-character extension to determine
the type (e.g., .fsa, .ab1, etc.); if no extension is found, assumes
the file is a sequence trace (.ab1).
Steve DePalma,
depalma © rascal.med.harvard
http://genetics.med.harvard.edu/~depalma