Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- Subject: Re: Can't get every document file of every folder of startup disk whose creator type = "MSIE"
- From: deivy petrescu <email@hidden>
- Date: Mon, 18 Dec 2006 23:43:47 -0500
On Dec 18, 2006, at 23:07, Bill Hernandez wrote:
On Dec 18, 2006, at 7:20 PM, deivy petrescu wrote:
set l to alias "BuiaBuio:Users:deivy:Desktop:Ex_Dtop_folder:"
-- the line below is really one line
tell application "Finder" to x set the creator type of (every
document file of (every folder) of l) whose (name contains ".txt")
to "R*ch"
I tried what you sent me but that did not work ?
set l to alias "HardDisk:Users:Bill:Desktop:"
tell application "Finder" to set the creator type of (every
document file of (every folder) of l) whose (name contains ".txt")
to "R*ch"
-- Finder got an error: Can't set creator type of every document
file of every folder of alias "HardDisk:Users:Bill:Desktop:" whose
name contains ".txt" to "R*ch".
-- I tried all of these, but they did not work either ?
set test to 3
if (test = 1) then
tell application "Finder"
set theFolder to (choose folder)
set the creator type of (every document file of (every folder
of theFolder)) whose (name contains ".txt") to "R*ch"
end tell
-- Finder got an error: Can't set creator type of every document
file of every folder of alias "HardDisk:Users:Bill:Desktop:" whose
name contains ".txt" to "R*ch".
end if
if (test = 2) then
tell application "Finder"
set theFolder to ((choose folder) as text)
open folder theFolder
set the creator type of (every document file of (every folder
of folder theFolder)) whose (name contains ".txt") to "R*ch"
end tell
-- Finder got an error: Can't get every folder of
"HardDisk:Users:Bill:Desktop:".
end if
if (test = 3) then
tell application "Finder"
set theFolder to (choose folder)
open folder theFolder
set Sel to get ((every document file of (every folder of
theFolder)) whose (name contains ".txt")) as alias list
repeat with theItem in aSel
set the creator type of theItem to "R*ch"
end repeat
end tell
-- Finder got an error: Can't get every folder of
"HardDisk:Users:Bill:Desktop:".
end if
if (test = 4) then
tell application "Finder"
set theFolder to (choose folder)
open folder theFolder
set Sel to get ((every document file of (every folder of
theFolder)) whose (name extension is "txt")) as alias list
repeat with theItem in aSel
set the creator type of theItem to "R*ch"
end repeat
end tell
-- Finder got an error: Can't get every folder of
"HardDisk:Users:Bill:Desktop:".
end if
Thanks for trying...
Bill Hernandez
Bill,
It does work!
However, look at my code, and at what I wrote: I do not use the
desktop.
The desktop contains *all* the folders since the HD is mounted there.
Here:
tell application "Finder" to get (every folder of the desktop)
-->{startup disk of application "Finder", disk "MacOS 9.2" of
application "Finder", folder "Ex_Dtop_folder" of desktop folder of
application "Finder", folder "Photos" of desktop folder of
application "Finder"}
Try a smaller folder.
In my tests, using "(every document file of (every folder of
theFolder))" was faster than "entire contents".
Deivy
_______________________________________________
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