• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Folder action question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder action question


  • Subject: Folder action question
  • From: Mark Butler <email@hidden>
  • Date: Sun, 25 Jan 2004 09:54:11 -0600

I have a folder action question...

This first script loops changing the name of the file until it hits
character limit

on adding folder items to this_folder after receiving added_items
set thislist to {}
tell application "Finder"
set this_name to name of this_folder as string
set this_folder to this_folder as alias
set mylist to every item of this_folder
repeat with i from 1 to number of items in mylist
set this_item to item i of mylist
set this_item to this_item as alias
if file type of this_item is "PDF " then
set this1 to name of this_item
set newname to this1 & this_name as string
set name of this_item to newname
end if
end repeat
end tell
end adding folder items to


This Second Script works correctly

on adding folder items to this_folder after receiving added_items
set thislist to {}
tell application "Finder"
set this_name to name of this_folder as string
set this_folder to this_folder as alias
set mylist to every item of this_folder
repeat with i from 1 to number of items in mylist
set this_item to item i of mylist
set this_item to this_item as alias
if file type of this_item is "PDF " then
set this1 to name of this_item
set newname to this1 & this_name as string
set name of this_item to "newname"
end if
end repeat
end tell
end adding folder items to

Can anyone tell me why??

Thanks
Mark
_______________________________________________
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.

  • Follow-Ups:
    • Re: Folder action question
      • From: Mátyás Ferenc Farkas <email@hidden>
  • Prev by Date: Re: Not able to get Folder Actions to work
  • Next by Date: Re: Not able to get Folder Actions to work
  • Previous by thread: Re: Not able to get Folder Actions to work
  • Next by thread: Re: Folder action question
  • Index(es):
    • Date
    • Thread