Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Using Files From Folder For Applescript
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="The Mule" data-source="post: 1319475" data-attributes="member: 221063"><p>I had another idea:</p><p></p><p>as the script works well for files in the parent folder can i do a simple script swell as that one to extract files from subfolders (when added) and move to parent folder</p><p></p><p>thus the second script will be innacted and hey presto it does the same thing.</p><p></p><p>my thought was:</p><p></p><p>on adding folder items to thisFolder after receiving addedItems</p><p> repeat with addedItem in addedItems</p><p> tell application "Finder"</p><p> if addedItem is "folder" then</p><p> set thedata to entire contents of folder "addedItem"</p><p> repeat with aItem in thedata</p><p> if class of aItem is not folder then</p><p> move aItem to folder thisFolder</p><p> end if</p><p> end repeat</p><p> end if</p><p> end tell</p><p> end repeat</p><p> </p><p>end adding folder items to</p></blockquote><p></p>
[QUOTE="The Mule, post: 1319475, member: 221063"] I had another idea: as the script works well for files in the parent folder can i do a simple script swell as that one to extract files from subfolders (when added) and move to parent folder thus the second script will be innacted and hey presto it does the same thing. my thought was: on adding folder items to thisFolder after receiving addedItems repeat with addedItem in addedItems tell application "Finder" if addedItem is "folder" then set thedata to entire contents of folder "addedItem" repeat with aItem in thedata if class of aItem is not folder then move aItem to folder thisFolder end if end repeat end if end tell end repeat end adding folder items to [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Using Files From Folder For Applescript
Top