What am I DOING!?!
What am I DOING!?!
- Subject: What am I DOING!?!
- From: Simeon Johnston <email@hidden>
- Date: Wed, 14 Aug 2002 11:04:52 -0500
OK. I had a thread before about stripping the resource forks from a
file and converting the text.
Now all I have to do is strip the resource for from the file, no
conversion needed.
But it has to search recursively through several layers of subfolders
and is going to be a droplet (NO choosing the folder/dialog stuff).
So far I've tried Akua and Jon's mods for searching (i.e. "walk folders"
and "the entries in" commands) but CAN'T GET THE freaking logic down.
The script needs to search for files that end in .?? (?? being real
letters preceeded by a period) and kill the resource fork from them.
Then (or before killing the res fork, don't matter) change the file type/creator.
I can get it to do those things (I still don't get the syntacs for the
Akua resource fork command) and it works but I need it to search through
the folders now.
I COULD do it via straight applescript but I've heard it's several times
slower than using Akua/Jon's or any other OSAXen that does that sorta thing.
As I'm just beginning to learn all this again I just can't get the
script right....
Please help,
sim
If I can get Akua to work correctly I'll probably also use it to remove
the resource fork so I only need the one OSAX rather then 2.
Script so far (er.. 2 seperate variations that don't do it all yet) ->>>
--on open (alltheItems)
-- set alltheFiles to the entries in alltheItems whose names match ".kd"
-- repeat with theFile in alltheFiles
-- try
-- tell application "Finder"
-- set locked of theFile to false
-- set file type of theFile to "ESKD"
-- set file type of theFile to "ESK2"
-- end tell
-- Kill Resource Fork theFile
-- on error number -49
-- exit repeat
-- end try
-- end repeat
--end open
--on open (alltheItems)
--
-- repeat with anItem in alltheItems
-- if anItem is folder then
-- set the entries in anItem to alltheFiles
-- repeat with theFile in alltheFiles
-- set theInfo to info for theFile
-- set fileName to name of theInfo
-- if fileName ends with ".kd" then
-- try
-- tell application "Finder"
-- set locked of theFile to false
-- set file type of theFile to "ESKD"
-- set creator type of theFile to "ESK2"
-- Kill Resource Fork theFile
-- end tell
-- on error number -49
-- exit repeat
-- end try
-- end if
-- end repeat
-- end if
-- end repeat
--
--end open
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.