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
macOS & iOS Developer Playground
macOS - Development and Darwin
Run the applescript on multiple folders at a time ?
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="adrianuzzu" data-source="post: 1735497" data-attributes="member: 384545"><p>Hey guys, I have a script that works great but the problem is, it works only one folder at a time</p><p></p><p>I need to run it on more folders at a time. Is it possible ? </p><p></p><p>Thank you guys ! </p><p></p><p></p><p>[CODE]on run {input, parameters}</p><p> </p><p> tell application "Finder"</p><p> </p><p> set dir to container of (item 1 of input) as alias -- get the parent folder</p><p> </p><p> set folderName to name of dir -- get the name of the parent folder</p><p> </p><p> </p><p> </p><p> set r to duplicate file "20.jpg" of dir</p><p> </p><p> set the name of r to "zoom_side.jpg"</p><p> </p><p> </p><p> </p><p> set r to duplicate file "23.jpg" of dir</p><p> </p><p> set the name of r to "zoom_sole.jpg"</p><p> </p><p> </p><p> </p><p> set the name of file "22.jpg" of dir to folderName & "-4.jpg"</p><p> </p><p> set the name of file "20.jpg" of dir to folderName & "-2.jpg"</p><p> </p><p> set the name of file "19.jpg" of dir to folderName & "-1.jpg"</p><p> </p><p> set the name of file "21.jpg" of dir to folderName & "-3.jpg"</p><p> </p><p> set the name of file "23.jpg" of dir to folderName & "-5.jpg"</p><p> </p><p> end tell</p><p> return input</p><p> </p><p>end run[/CODE]</p></blockquote><p></p>
[QUOTE="adrianuzzu, post: 1735497, member: 384545"] Hey guys, I have a script that works great but the problem is, it works only one folder at a time I need to run it on more folders at a time. Is it possible ? Thank you guys ! [CODE]on run {input, parameters} tell application "Finder" set dir to container of (item 1 of input) as alias -- get the parent folder set folderName to name of dir -- get the name of the parent folder set r to duplicate file "20.jpg" of dir set the name of r to "zoom_side.jpg" set r to duplicate file "23.jpg" of dir set the name of r to "zoom_sole.jpg" set the name of file "22.jpg" of dir to folderName & "-4.jpg" set the name of file "20.jpg" of dir to folderName & "-2.jpg" set the name of file "19.jpg" of dir to folderName & "-1.jpg" set the name of file "21.jpg" of dir to folderName & "-3.jpg" set the name of file "23.jpg" of dir to folderName & "-5.jpg" end tell return input end run[/CODE] [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Run the applescript on multiple folders at a time ?
Top