Jump to content

Create a rename file/folder universal action within Alfred?


Recommended Posts

Hi, I'm still getting used to Universal Actions and was wondering if it would be possible to create one to rename the currently selected file/folder in Alfred using the following workflow?

 

Proposed Workflow:

  1. Open Alfred and search for the file/folder I'm looking for
  2. Once found, hit a keyboard shortcut (e.g. Cmd-R) to trigger a Rename workflow on that file, without having to first hit tab to show all actions
  3. Input a new file name
  4. Hit enter and still have the same file select so I can perform additional actions if needed e.g. Move, Email, etc..

 

Thx

Link to comment

Most of what you ask can already be done with RenameAction (disclaimer: I’m the author).


The changes it needs to work as you want are small, but I also feel they’re pretty niche (reopening the actions panel) or potentially cumbersome (pressing the shortcut while seeing the file on an Alfred results won’t work as expected if the text is selected).


So I can give you a modified version of RenameAction which works as you describe. I removed the auto-updater so it won’t try to replace itself with updates to the main version.

Link to comment

WOW, thank you so much for doing this Vitor 🙌.

 

Very much appreciated!!

 

Some quick questions I wanted to ask:

  1. The name of the file in the action menu still shows the old name after hitting enter, although the path is correct
  2. When doing this on folders Alfred seems to close after hitting enter instead of showing the action menu
  3. Is it possible to return back to the view I was on when triggering the Rename hotkey instead of showing the action menu perhaps as an action modifier?
    1. I know I mentioned above that I usually like to perform additional actions on that file but sometimes I'm looking to rename a few file in the search results that are being displayed or the folder I'm browsing.

Thx again for you help.

Edited by Alfred0
Link to comment
40 minutes ago, Alfred0 said:

Is it possible to return back to the view I was on when triggering the Rename hotkey

 

That's not possible. The workflow has no way of knowing which view you came from, nor can you tell Alfred to navigate to an arbitrary view. The closest you can get is re-opening Alfred and simulating a ↑ keypress to go to the previous query.

Link to comment
6 hours ago, Alfred0 said:

Some quick questions I wanted to ask


Those can’t be changed; the Workflow has to work within Alfred’s parameters. Like I said, your needs are niche and the solutions a tad cumbersome, which is why I won’t add them to the main Workflow.

Link to comment
  • 3 weeks later...

Got it, thx @vitor and @deanishe!

 

@Andrew, it would be great to consider adding built-in support for common file actions such as rename, copy/move, and duplicate. I'm sure there are a number of different workflows that could accomplish some of this but that adds a lot more friction.

 

Here's an example of something I do a lot of to illustrate e.g. renaming a file and then dragging it on to an application.

  1. Find the file (Search or Trickster)
  2. Rename the file. At this point I'm in the actions menu view which unfortunately does not allow dragging the selected file? Would be great if this would work.
  3. I need to dismiss and then re-trigger Alfred
  4. Again find the file I just renamed
  5. Finally, drag it to the app.

Steps 3-4 seem unnecessary.

Link to comment
9 hours ago, Alfred0 said:

adding built-in support for common file actions such as rename, copy/move, and duplicate.


There is built-in support for copy and move.

 

9 hours ago, Alfred0 said:

I'm sure there are a number of different workflows that could accomplish some of this but that adds a lot more friction.


Apart from a one-time Workflow installation, there’s no extra friction. Workflows for these actions can behave exactly like built-in actions.

 

What you’re looking for is custom behaviour, which is precisely why Workflows are a good thing. Workflows are a powerful core feature meant to be used, not an afterthought. They enable you to have what you want, exactly how you want it. The alternative would mean changing the default behaviour for everyone else, and Alfred’s defaults should strive to accommodate the needs of the many.

Edited by vitor
Link to comment
  • 1 year later...

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