Automator New Folder and Subfolders?

Started by AaronH, January 29, 2019, 11:39:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AaronH

Hey guys, I was wondering if anyone knew how to do what I'm trying to do.

Basically, I'm trying to create an action in Automator that would create a folder in the current finder window, name it 0000_Job, then create four subfolders within it with their own names. Is this possible? I'm trying to minimize how frequently I have to move windows to get to the desktop to copy a folder I have on my desktop.

If the automator thing isn't possible, is it possible to have some sort of shortcut to copy this folder from my desktop with a click of an icon in the finder window toolbar?

Thanks!
Aaron
Mac & Windows | XMF | Fiery | Oris

DigiCorn

Not sure entirely what you need it for, but I just have a folder on my server called "New Folder on Sever" with all the subfolders inside I need. Then I just copy it and rename as needed to the desired location.
"There's been a lot of research recently on how hard it is to dislodge an impression once it's been implanted in someone's mind. (This is why political attack ads don't have to be true to be effective. The other side can point out their inaccuracies, but the voter's mind privileges the memory of the original accusation, which was juicier than any counterargument ever could be.)"
― Johnny Carson

"Selling my soul would be a lot easier if I could just find it."
– Nikki Sixx

"Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut."
― Ernest Hemingway

scottrsimons

I do the same as DigiCorn. Much easier than Automater, which I used to do too.
"Your superior intellect is no match for our puny weapons!" - Homer J. Simpson

zox

Put this into script editor and save it.

I modified existing script that actually ask you docket number to dumb it down to write always 0000_Job

tell application "Finder"
try
set currentfolder to (folder of the front window as string)
on error
display dialog "This script will not work on the desktop. Please navigate to a folder and run the script." with icon stop buttons {"Cancel"}
end try
set jobname to "0000_Job"
try
make new folder at currentfolder with properties {name:jobname}
on error
display dialog "That folder already exists" with icon stop buttons {"Cancel"}
end try
set jobfolder to (folder (currentfolder & jobname) as string)
make new folder at jobfolder with properties {name:"FOLDER1"}
make new folder at jobfolder with properties {name:"FOLDER2"}
make new folder at jobfolder with properties {name:"FOLDER3"}
make new folder at jobfolder with properties {name:"FOLDER4"}
open jobfolder
set the current view of Finder window jobname to list view
end tell

I hope this helps

Kermy812

Not an expert with automator - It seem like I do things with automator like one a year... I think this might be what you want:
https://www.macworld.com/article/2038095/5-automator-workflows-everyone-should-have.html
Go to the section "Create subfolder"
You then can create a automator service, so you can right click on a folder to run that service to make your sub folders in it.
Watch out! I was playing around and didn't select check "ignore input" as it says there, when it the copied a few thousand files from my path into in it - Yikes!

AaronH

Awesome! Thanks guys. I'll give these a shot.
Mac & Windows | XMF | Fiery | Oris

Skovby

Great!

I would like a script, pretty simlular to the one above.

But when I run the script, I would like the possibility to enter what the name of the folder shold be (specific job name), before it creates it and the four subfolders which always has the same names.

Is that possible?

Skovby

#7
Somthing like this maybe

It just needs to make the folder and subfolders in the specifik folder I am in when running the script. This script asks where to put the folder, I don't won't it to do that. I would just like the script to put the new folder (with custom name) and the subfolders (always same names) it in the current folder, and open new folder with the name I've given it, in the samme window, so I can see the subfolders when the script is done.

tell application "Finder"
    set JobName to text returned of (display dialog "Please enter Job Name:" default answer "Job_Name")
    set loc to choose folder "Choose Parent Folder Location"
    set newfoldername to JobName
    set newfo to make new folder at loc with properties {name:newfoldername}
    make new folder at newfo with properties {name:"Job Materials"}
    make new folder at newfo with properties {name:"Previews"}
    make new folder at newfo with properties {name:"PSDs"}
    make new folder at newfo with properties {name:"VX"}
end tell

swampymarsh

Using the script supplied by ZOX, I just created an Automator workflow/service so that I could right click in the Finder to create the new folder/subfolder structure.

I have attached a zip of the .workflow file and screenshot if this helps.

AaronH

Mac & Windows | XMF | Fiery | Oris