Benches macOS

4

create multiple folders in automator

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

i cant seem to crack this there seem to be many applescripts out there but cant find one as basic as my needs, am trying to create a subfolder system within a folder to sort out work, id like to be able to do the following:

tell automator to create x folders within folder with prefix xyz + sequential numbering ie. project001 project002 etc.

i know it sounds basic and probably is but have been googling away without any joy and the create folder option in automator only makes one at a time which defeats the point.Have also tired the get items and rename but it doesnt want to change folders. any and all help greatly appreciated

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    this is easily handled by apple script action.

    say the following will work.

    1. get selected (or specified) finder items.

    put the folder where you want to create all these subfolders here.

    2. run apple script

    <pre style="

    font-family: Monaco, 'Courier New', Courier, monospace;

    font-size: 10px;

    margin: 0px;

    padding: 5px;

    border: 1px solid #000000;

    width: 720px;

    color: #000000;

    background-color: #ADD8E6;

    overflow: auto;"

    title="this text can be pasted into the Script Editor">

    on run {input, parameters}

    repeat with i from 1 to 10

    tell application "Finder"

    make new folder at input with properties {name:"xyz" & i}

    end tell

    end repeat

    end run</pre>

    the above makes 10 subfolders. adjust that as you like.

  2. 0

    dominijk

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    wow, that was easy! thank you so much.

  3. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    you are welcome!

  4. 0

    Community User

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    How would you do it if you didn't want sequential numbering but instead where each folder has different names e.g. (html, css, images, js)?

    Thanks. I hope you don't mind me asking. You just seem to be the person in the know around here ^_^

    D ^_^