Jump to content

how to use "make new folder" automation?


Recommended Posts

Hi folks, long time user, first time poster. I'm trying to figure out how to use the "make new folder" automation, but I'm stymied because I have no idea where the folder is created, and there's no way to input a name so I can search to find it. I'm clearly missing something. My goal is to create a workflow that will take a group of selected files, create a new folder in their current folder, and move them to the new folder. I'm already struggling to grok how to all the objects work together, so this automation being completely opaque is really not helping 😅 Can any of y'all help me figure this out?

Link to comment

I am sure there is a more elegant way to do this but the following works for me:

  • Use an Automation Task Get Path Dirname to obtain the path of the folder containing the files.
  • Link that to an Automation Task Get First Argument (you want only one path if you have selected multiple files in the folder).
  • Link that to an Arg and Vars utility and for the passed out argument choose {query}/[your new folder name].
  • Link that to the Automation Task Make new folder.

Stephen

Link to comment

Okay, that at least got me a new folder in the right location - hooray! Is there a way for it to prompt me for the folder name, or does it have to be the same name every time? And is there a way to then move the files to the new folder? I'm sure it will involve the universal action, but since the output of this is a folder and not the original files, I'm not sure how to tell it to look at the files again.

Link to comment
2 hours ago, prettyfaroutman said:

Is there a way for it to prompt me for the folder name, or does it have to be the same name every time? And is there a way to then move the files to the new folder?

Save the files to a variable using the Arg and Vars utility, link (but don't pass through the files variable) to a Keyword input leaving the keyword itself blank. Use the latter as the prompt for your new folder name and save that name, too, as a variable. You can then, later in the workflow, use:

  • the new folder variable to name the new folder; and
  • the files variable to move them to the new folder.

You may want to take a look at a couple of my workflows on GitHub just to help understand. Find and Replace in Clipboard Text (download link) demonstrates use of the Keyword action to which I've referred. Shrink JPEG/PNG files (download link) shows the way I dealt with multiple file inputs. Apologies for mentioning my own workflows but the examples potentially save rather a lot of typing here.

 

By the way, there are far better qualified people here than I am so take all of this as general guidance. I've no doubt someone will, sooner or later, come along with better suggestions! 😀

 

Stephen

Link to comment

After banging away at this all afternoon, I finally got it to work - hooray! Your workflows were invaluable to my understanding of how the elements all work together, so no apologies necessary. Thanks so much, Stephen!

 

IDK if there's anyone else who'd be interested in using the workflow I made (warning: it's very messy), but I'm happy to share if anyone wants.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...