Alfred0 Posted October 27, 2021 Share Posted October 27, 2021 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: Open Alfred and search for the file/folder I'm looking for 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 Input a new file name 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
vitor Posted October 28, 2021 Share Posted October 28, 2021 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. AlfredForDan 1 Link to comment
Alfred0 Posted October 28, 2021 Author Share Posted October 28, 2021 (edited) WOW, thank you so much for doing this Vitor 🙌. Very much appreciated!! Some quick questions I wanted to ask: The name of the file in the action menu still shows the old name after hitting enter, although the path is correct When doing this on folders Alfred seems to close after hitting enter instead of showing the action menu 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? 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 October 28, 2021 by Alfred0 Link to comment
deanishe Posted October 28, 2021 Share Posted October 28, 2021 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
vitor Posted October 28, 2021 Share Posted October 28, 2021 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
Alfred0 Posted November 16, 2021 Author Share Posted November 16, 2021 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. Find the file (Search or Trickster) 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. I need to dismiss and then re-trigger Alfred Again find the file I just renamed Finally, drag it to the app. Steps 3-4 seem unnecessary. Link to comment
vitor Posted November 16, 2021 Share Posted November 16, 2021 (edited) 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 November 16, 2021 by vitor Link to comment
Laterral Posted April 3, 2023 Share Posted April 3, 2023 @vitor you universal action is amazing!! it just works exactly as expected. any idea if you/ someone built on this a "Duplicate" universal action? Link to comment
vitor Posted April 3, 2023 Share Posted April 3, 2023 @Laterral You can build it yourself without code. Connect a Universal Action Trigger to an Automation Task (Files and Folders → Duplicate Path) and you’re good to go. For an interactive tutorial on making a workflow, see the Getting Started Guide. AlfredForDan 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