Informacyde Posted June 18 Share Posted June 18 Hello, I'm trying to do the following in my workflows but I can't manage it. It seems basic but I'm having trouble... Could you help me? I'm trying to do the following: when I type a word in Alfred, it creates a predefined directory tree in the Finder, at the location where I am. Many thanks Link to comment
Stephen_C Posted June 18 Share Posted June 18 Welcome to the forum. It may be that @sepulchra can assist: see, for example, this post of his and the thread of which it's part. You may need, though, to be a little clearer about exactly what you mean by "a predefined directory tree". Can you perhaps give a specific example showing what both the root folder and the resulting tree would look like? xste Link to comment
sepulchra Posted June 18 Share Posted June 18 @Informacyde Stephen is right to flag that other thread. I believe that should do what you are looking for. If you have questions -- it might make sense to jump in that other thread. Link to comment
Informacyde Posted June 18 Author Share Posted June 18 32 minutes ago, Stephen_C said: Welcome to the forum. It may be that @sepulchra can assist: see, for example, this post of his and the thread of which it's part. You may need, though, to be a little clearer about exactly what you mean by "a predefined directory tree". Can you perhaps give a specific example showing what both the root folder and the resulting tree would look like? xste Thank you for your welcome and your feedback. Here's a clearer explanation: I have a photo folder for my work. Inside, it's sorted by year. And I put photos according to events. So I want to create a new folder called event 1, for example, and then use alfred to automatically create 5 empty folders in it: Here is the aborescence Photos > 2024 > Event 1 > Légères (folder 1) - Lourdes (folder 2) - Palmarès (folder 3) - Photos (folder 4) - Sélection (folder 5). And ideally, if I can, in light, have a sub-tree with (PNG) and (WebP), that would be absolutely perfect. I'm going to have a look while I wait for the other post you mention. Thanks Link to comment
Informacyde Posted June 18 Author Share Posted June 18 4 minutes ago, sepulchra said: @Informacyde Stephen is right to flag that other thread. I believe that should do what you are looking for. If you have questions -- it might make sense to jump in that other thread. Thanks, I've just looked at it but it doesn't tell me how to do it unfortunately, it just says it's possible, which I suspected. The shared file no longer looks downloadable Link to comment
sepulchra Posted June 18 Share Posted June 18 (edited) I adapted the workflow for your needs. I believe this should do what you need. https://transfer.archivete.am/JlFoT/Folder Tree TEMPLATE test.alfredworkflow If you open up the args and vars objects it should give you a sense of how the folder trees are being created. Edited June 18 by sepulchra Stephen_C 1 Link to comment
Informacyde Posted June 18 Author Share Posted June 18 Thank you very much, it works, it's incredible! I'm looking at how it works but I'm having a bit of trouble. I'm going to persevere and try adding the "PNG" and "WebP" folders to the "light" directory. It's a shame, though, that Alfred hasn't made it a bit simpler and more accessible for people who don't know much about code. Link to comment
sepulchra Posted June 18 Share Posted June 18 (edited) if you open up the args and vars object if will give you an idea..... try adding what is in my sreenshot below. I really don't code either, so it is just getting to know the objects and what they do. you'll get the hang of it Edited June 18 by sepulchra Link to comment
sepulchra Posted June 18 Share Posted June 18 also if you hit the question mark on any of the objects you open it will take you to some helpful tutorials like this one: https://www.alfredapp.com/help/workflows/utilities/argument/ -- also the getting started guide is really helpful too. Link to comment
Informacyde Posted June 18 Author Share Posted June 18 Super, thank you very much, I'm going to do my tests, I've got to do it on my own! sepulchra 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now