BIZARRE File Type returned...sometimes!
BIZARRE File Type returned...sometimes!
- Subject: BIZARRE File Type returned...sometimes!
- From: Michael Tompsett <email@hidden>
- Date: Tue, 29 Jun 2004 16:13:01 +0100
I m running this script to search through folders and delete quark files.
Sometimes it works, sometimes it doesn't. It falls down when all FILE TYPEs are wrongly reported as being: "x?Z" rather "XDOC" or "ESPF" or whatever file type they really are.
Sometimes this change takes place halfway though the running of the script (hence the warning if it fails)!
Anyway the script is below. Any idea why this is happening? Many Thanks
OSX 10.3.4, AS 1.9.3, Script Editor 2.0 (v43)
tell application "Finder"
set thefolder to choose folder with prompt "Select Folder"
set thelist to entire contents of thefolder
repeat with i in (thelist as list)
set i to (i as string)
if last character of i ? ":" then
try
set thetype to file type of alias i
if thetype = "x?Z" then
display dialog "FAILED"
exit repeat
end if
if thetype = "XDOC" then delete file i
end try
end if --last character
end repeat --with i
end tell
_______________________________________________
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.