Folder action question
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.