Re: Migration to Tiger
Re: Migration to Tiger
- Subject: Re: Migration to Tiger
- From: Brett Conlon <email@hidden>
- Date: Wed, 29 Nov 2006 08:58:31 +1000
Hi Jack (good old Aussie name that!
;-)
Matey, I'm actually quite surprised
that your image files and PDFs don't have suffixes. This has obviously
come back to bite you on the bum, big-time! Or are they client files supplied
without suffixes - there you go I gave you an out. ;-D
I think you'll have to write some code
which tests the file type of each file and append the suffix. I'll paste
in a little part of a script I use here for determining file types. It
is a start for you to adapt to then renaming the file.
As for, say, Quark and Illustrator files
etc, I've found that if I have an OS9 copy of the application sitting on
the computer somewhere the document icons for those apps appear, otherwise
they are sometimes just generic documents.
Here's the file type code:
--
Requires Satimage.osax
on
run
set
PickItems to
navchoose object with prompt "Choose folder/s for Archive checking
or choose file/s to check their file type." with
multiple files
tell
application "Finder"
repeat
with
ThisItem in
PickItems
if
class of
item ThisItem is
document file then
my
TestFileProperties(ThisItem)
else
if
class of
item ThisItem is
folder then
--whatever
you want it to do..
end
if
end
repeat
beep 3
activate
display dialog "Processing
is complete" buttons {"Thanks"} default button 1
end
tell
end
run
on
TestFileProperties(ThisItem)
tell
application "Finder"
set
Fname to
name of
ThisItem
set
Ftype to
file type of
(info for (ThisItem))
set
Fkind to
kind of
(info for (ThisItem))
tell
me
to
display dialog "File type of file" & return & return
& Fname & return & return & "is:" & "
[" & Ftype & "]" & return & return
& "It may be of kind: " & Fkind
end
tell
end
TestFileProperties
Cheers,
Coj
email@hidden
Sent by: applescript-users-bounces+brett.conlon=email@hidden
29/11/06 03:23 AM
|
To
| Applescript Users <email@hidden>
|
cc
|
|
Subject
| Migration to Tiger |
|
All,
I hope some one can enlighten me quickly, otherwise
I'll be burning up my keyboard scripting in the next two weeks.
I'm migrating a PrePress environment from OS
9 to Tiger (10.4.8). One of the 'opportunities' I'm confronting is
how the finder is not recognizing files of the OS 9 genre (dual-forked)
without a suffix. I've got gigs upon gigs of files that are in this
format that the PrePress folks will have to access for years to come. I
think I'm looking for a quick and easy way to convert these files from
dual-forked to data only files on the fly. These files are mixed
containing some multiple file types, such as PDF, tiff, eps, psd, txt,
etc. , unfortunately, Finder sees them all as unix executables because
they don't have suffixes, or at least, most don't.
I can probably write something that looks at
each file and algorithmically determines what suffix should go with it,
and just rename the file, but that could be a bit of a bear, but if that's
what I'm relegated to doing, sobeit..... but, thought someone on this list
might know of something that's much more efficient and more precise than
anything I might come up with. Any brilliant ideas?
Jack Lehr (email@hidden)
(813) 635-3360 (O)
(813) 767-6542 (M) _______________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden