Jump to content

create new folder


Recommended Posts

Hi,

is there any simple and straightforward way to create a new folder with Alfred from within Alfred's file manager?

 

Let me know if the workflow suggested by Vero doesn't fulfill your needs. If not, I'll see if I can put something together to help you out.

Link to comment
  • 2 weeks later...

Let me know if the workflow suggested by Vero doesn't fulfill your needs. If not, I'll see if I can put something together to help you out.

Hi David, the above workflow is not working for me at all (which could be because I don't quite get how to use it). Essentially, what I am looking for is this: I want to select several files in Alfred and be able to navigate to a particular folder (all working well) -- what I am missing is a way to easily create a new folder to put the files in. It seems counterintuitive to me that I can do all these things in Alfred but when it comes to creating a folder I have to return to the finder. Essentially, what I am looking for is a "make directory" command in Alfred file navigation which creates a new folder in the current folder. Thanks for looking into this!

Link to comment

Hi David, the above workflow is not working for me at all (which could be because I don't quite get how to use it). Essentially, what I am looking for is this: I want to select several files in Alfred and be able to navigate to a particular folder (all working well) -- what I am missing is a way to easily create a new folder to put the files in. It seems counterintuitive to me that I can do all these things in Alfred but when it comes to creating a folder I have to return to the finder. Essentially, what I am looking for is a "make directory" command in Alfred file navigation which creates a new folder in the current folder. Thanks for looking into this!

 

Nice idea. I’ll try to make a workflow for you.

Link to comment

Hi David, the above workflow is not working for me at all (which could be because I don't quite get how to use it). Essentially, what I am looking for is this: I want to select several files in Alfred and be able to navigate to a particular folder (all working well) -- what I am missing is a way to easily create a new folder to put the files in. It seems counterintuitive to me that I can do all these things in Alfred but when it comes to creating a folder I have to return to the finder. Essentially, what I am looking for is a "make directory" command in Alfred file navigation which creates a new folder in the current folder. Thanks for looking into this!

 

Quick stab at it.. try this: Download

 

Try that out, let me know what you think and we can try to improve it from there (if needed)

Link to comment

Hi David, the above workflow is not working for me at all (which could be because I don't quite get how to use it). Essentially, what I am looking for is this: I want to select several files in Alfred and be able to navigate to a particular folder (all working well) -- what I am missing is a way to easily create a new folder to put the files in. It seems counterintuitive to me that I can do all these things in Alfred but when it comes to creating a folder I have to return to the finder. Essentially, what I am looking for is a "make directory" command in Alfred file navigation which creates a new folder in the current folder. Thanks for looking into this!

 

David was faster!

 

Anyway, here is my approach considering your suggestion:

 

  • Right now it works as an Alfred File Action only
  • Select the files in Alfred browser, select “To New Folder” action then one of the 3 options below (move, copy or only create a new folder):

tnf_01.png

 

Downlaod now

Link to comment

Carlos-Sz,

 

This is what I was looking for. And It makes sense to have it as a file action. It is kind of weird that it makes you return to the regular alfred window once you choose the file action but I guess there is no other way of doing this. Thanks!

Edited by roza
Link to comment

Carlos-Sz,

 

This is what I was looking for. And It makes sense to have it as a file action. It is kind of weird that it makes you return to the regular alfred window once you choose the file action but I guess there is no other way of doing this. Thanks!

 

Great! When I started using workflows that made me return to Alfred window I thought the same but after awhile you get use to it and then it becomes natural (like in To Do workflow).

Link to comment
  • 6 months later...

This should really be built into Alfred. When you're browsing the filesystem, you should be able to navigate to the directory where you want to create the file/folder and start typing the name of the new file/folder as if you were trying to navigate to it. Instead of that big useless blank space below, it could show "Create new file at <path + what you've typed so far>" as an option. To create a folder, just put a slash at the end and it'll change to say "Create new folder at <path + what you've typed>". Or you could have both options appear below at the same time to avoid having to type the slash. It could also be smart to new nested folders, so you could /just/keeping/typing/your/path and it would create all the necessary new folders.

Link to comment

Quick stab at it.. try this: Download

 

Try that out, let me know what you think and we can try to improve it from there (if needed)

 

 David, I just wanted to say thanks. This workflow is exactly what I was looking for. I'm basically new to Alfred. Switching over from Launchbar and haven't figured out the techniques for making workflows.  :D

Edited by Roller
Link to comment
  • 3 weeks later...
Guest atomkraft

Anyone up for a workflow which will work outside of Alfred File Action? I'd want the possibility of creating a new folder in Finder in the current path when entering a keyword.

 

To illustrate;

active window is Finder

bring up alfred

type keyword (nfolder <foldername>)

the folder would be created at the same path as the previously active Finder window

 

Is this possible? I've tried 3 different workflows but they dont seem to act the way i seek.

 

Thanks in advance

 

Link to comment

Anyone up for a workflow which will work outside of Alfred File Action? I'd want the possibility of creating a new folder in Finder in the current path when entering a keyword.

 

To illustrate;

active window is Finder

bring up alfred

type keyword (nfolder <foldername>)

the folder would be created at the same path as the previously active Finder window

 

Is this possible? I've tried 3 different workflows but they dont seem to act the way i seek.

 

Thanks in advance

 

 

Try this: Download

Link to comment
Guest atomkraft

Try this: Download

 

Great mate! Thanks a lot you just made my next days alot easier =)

You rock

 

Edit: 

Would it be possible for you to create a similar flow for a new file aswell? I'm not really comfortable editing this stuff myself.. fear of breakage! 

Edited by atomkraft
Link to comment

Great mate! Thanks a lot you just made my next days alot easier =)

You rock

 

Edit: 

Would it be possible for you to create a similar flow for a new file aswell? I'm not really comfortable editing this stuff myself.. fear of breakage! 

 

Yeah this one could be modified pretty easily to make new files instead. Would just be a new keyword and instead of mkdir I'd use touch. I'll get it back to you shortly. Just getting ready for the day

Link to comment
Guest atomkraft

Yeah this one could be modified pretty easily to make new files instead. Would just be a new keyword and instead of mkdir I'd use touch. I'll get it back to you shortly. Just getting ready for the day

 

Would the Run Script part just look like this?

 

fn="{query}"
path=$(osascript -e 'tell app "Finder" to return POSIX path of ((folder of front Finder window) as alias)')
 
touch "$path$fn"

 

 

Thanks

 

Edit: it works just fine now :) Wow

Edited by atomkraft
Link to comment
  • 4 weeks later...

I'm using this workflow to create new folders with a keyword but it doesn't seem to work on the desktop. Is there an easy way to modify this slightly so that if there's no open Finder window, a new folder will be created on the desktop?

 

Theoretically yes, you could but this workflow would have to be adjusted a good bit since its not just using AppleScript to grab the current path there. It's using the current selection or a result action to grab the current path. If there is no selection, it just doesn't do anything. One way you could get around this is just to select a file on the desktop and then use the hotkey.

Link to comment

Theoretically yes, you could but this workflow would have to be adjusted a good bit since its not just using AppleScript to grab the current path there. It's using the current selection or a result action to grab the current path. If there is no selection, it just doesn't do anything. One way you could get around this is just to select a file on the desktop and then use the hotkey.

 

Okay, that makes sense. Thanks for explaining it to me!

Link to comment
  • 2 years later...

Hi, the workflow doesn't work for me (Alfred 3.1). 

The error message is "[2016-08-22 17:34:15][ERROR: action.script] 0:135: execution error: Alfred 3 ha trovato un errore: "j new folder " non è in grado di capire il messaggio “«event alf2Sear»”. (-1708)".

 

Can you help me?
Thanks in advance. 

Martino

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...