Send Applescript-users mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/applescript-users
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Applescript-users digest..."
Today's Topics:
1. Re: Help with moving folders via applescript (Mark J. Reed)
2. Re: Help with moving folders via applescript (Axel Luttgens)
3. path names separators (Bob Cuilla)
4. Re: Help with moving folders via applescript (Jim Hankins)
5. Re: Help with moving folders via applescript (Neil Faiman)
----------------------------------------------------------------------
Message: 1
Date: Sun, 18 Dec 2005 13:56:57 -0500
From: "Mark J. Reed" <email@hidden>
Subject: Re: Help with moving folders via applescript
To: Jim Hankins <email@hidden>
Cc: AppleScript Users <email@hidden>
Message-ID:
<email@hidden>
Content-Type: text/plain; charset="utf-8"
On 12/18/05, Jim Hankins <email@hidden> wrote:
I get this
Finder got an error: Can't get every folder whose class = folder of
desktop.
Yeah, you need to rearrange. It thinks that you're asking for every
folder
whose class is (folder of the desktop), which isn't a valid class.
Try this:
move (every folder of desktop whose class is folder) to folder...
When I try this:
*tell* application "Finder"
*if* *not* (*the* folder "Old Desktop" *of* home exists) *then*
make new folder at home with properties {name:"Old Desktop"}
*end* *if*
move *every* file *of* *the* desktop to *the* folder "Old Desktop"
*of*
home
move (*every* folder *whose* class *is* folder *of* *the* desktop) to
*the
* folder "Old Desktop" *of* home
*end* *tell*
*
*
*
*
On Dec 18, 2005, at 1:33 PM, Jim Hankins wrote:
Ah ha, yes and I confirmed if the disks were not there (by turning off
that preference is Finder) the previous script worked as well.
Thanks!!!
On Dec 18, 2005, at 1:21 PM, Mark J. Reed wrote:
On 12/18/05, Axel Luttgens <email@hidden> wrote:
Jim Hankins wrote:
[...]
move *every* folder *of* *the* desktop to *the* folder "Old
Desktop" *
of* home <<<<<<it errors on this line
*[...]*
Doesn't "every folder of the desktop" return a list with every disk
showing on the desktop as well as the destination folder too?
The destination folder isn't on the Desktop; it's in the user's home
directory. The disk thing looks like it's the problem, though.
"every
folder whose class is folder" looks redundant but works fine.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
--
Mark J. Reed <email@hidden>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/
20051218/143d0d70/attachment.html
------------------------------
Message: 2
Date: Sun, 18 Dec 2005 20:16:09 +0100
From: Axel Luttgens <email@hidden>
Subject: Re: Help with moving folders via applescript
To: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="utf-8"
Mark J. Reed wrote:
On 12/18/05, Axel Luttgens <email@hidden
<mailto:email@hidden>> wrote:
Jim Hankins wrote:
[...]
move every folder of the desktop to the folder "Old Desktop" of
home <<<<<<it errors on this line
[...]
Doesn't "every folder of the desktop" return a list with every
disk showing on the desktop as well as the destination folder too?
The destination folder isn't on the Desktop; it's in the user's home
directory.
Oops... sorry!
It seems that while reading Jim's code, I mentally translated "home" by
"desktop".
Time to have some holidays?
Axel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/
20051218/b59d1fb4/attachment.html
------------------------------
Message: 3
Date: Sun, 18 Dec 2005 14:33:13 -0500
From: Bob Cuilla <email@hidden>
Subject: path names separators
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
I am using some native AS inside of Filemaker Pro 8. When I use the
FM Get Desktop Path function it returns a path that uses "/"
separators for files/folders etc. AS doesn't seem to like these
separators. If I replace the "/" with ":" AS handles them just fine.
Can I assume from this the AS doesn't like the "/" in path names?
Bob Cuilla
------------------------------
Message: 4
Date: Sun, 18 Dec 2005 14:34:45 -0500
From: Jim Hankins <email@hidden>
Subject: Re: Help with moving folders via applescript
To: "Mark J. Reed" <email@hidden>
Cc: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
That did it! Thanks for the help! I'm forever cleaning up my desktop,
this is a real timesaver and I'm enjoying the discovery of apple
script's ability to save me time.
Cheers!
Jim
On Dec 18, 2005, at 1:56 PM, Mark J. Reed wrote:
On 12/18/05, Jim Hankins <email@hidden> wrote:
I get this
Finder got an error: Can't get every folder whose class = folder of
desktop.
Yeah, you need to rearrange. It thinks that you're asking for
every folder whose class is (folder of the desktop), which isn't a
valid class.
Try this:
move (every folder of desktop whose class is folder) to folder...
When I try this:
tell application "Finder"
if not (the folder "Old Desktop" of home exists) then
make new folder at home with properties {name:"Old Desktop"}
end if
move every file of the desktop to the folder "Old Desktop" of home
move (every folder whose class is folder of the desktop) to the
folder "Old Desktop" of home
end tell
On Dec 18, 2005, at 1:33 PM, Jim Hankins wrote:
Ah ha, yes and I confirmed if the disks were not there (by turning
off that preference is Finder) the previous script worked as well.
Thanks!!!
On Dec 18, 2005, at 1:21 PM, Mark J. Reed wrote:
On 12/18/05, Axel Luttgens < email@hidden> wrote:
Jim Hankins wrote:
[...]
move every folder of the desktop to the folder "Old Desktop"
of home <<<<<<it errors on this line
[...]
Doesn't "every folder of the desktop" return a list with every
disk showing on the desktop as well as the destination folder too?
The destination folder isn't on the Desktop; it's in the user's
home directory. The disk thing looks like it's the problem,
though. "every folder whose class is folder" looks redundant but
works fine.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40hankinsbay.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (Applescript-
email@hidden )
Help/Unsubscribe/Update your Subscription:
40hankinsbay.com
This email sent to email@hidden
--
Mark J. Reed <email@hidden>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/
20051218/49e0ae42/attachment.html
------------------------------
Message: 5
Date: Sun, 18 Dec 2005 14:46:07 -0500
From: Neil Faiman <email@hidden>
Subject: Re: Help with moving folders via applescript
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
On Dec 18, 2005, at 1:22 PM, Jim Hankins wrote:
I got the following:
"Finder got an error: Illegal comparison or logical."
When I tried this:
tell application "Finder"
if not (the folder "Old Desktop" of home exists) then
make new folder at home with properties {name:"Old Desktop"}
end if
move every file of the desktop to the folder "Old Desktop" of home
move (every folder of the desktop whose (name is not "Macintosh
HD" or "HD 2")) to the folder "Old Desktop" of home
end tell
"HD 2" is not a valid operand of the or operator, even in a whose
clause. I believe that you want
whose (name is not "Macintosh HD" and name is not "HD 2")
Regards,
Neil Faiman
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/mailman/private/applescript-users/attachments/
20051218/20c414d6/attachment.html
------------------------------
_______________________________________________
Applescript-users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users
End of Applescript-users Digest, Vol 2, Issue 829
*************************************************