deanishe Posted June 6, 2021 Share Posted June 6, 2021 15 hours ago, vitor said: it acts on the whole path, so it may rename a directory and then can’t get to the files inside Sounds like the real problem is that it works top-down instead of bottom-up. Link to comment
vitor Posted June 6, 2021 Author Share Posted June 6, 2021 42 minutes ago, deanishe said: Sounds like the real problem is that it works top-down instead of bottom-up. Tried that but the result was the same. Also tried making a loop to rename one result at a time and thought about changing directories before doing the rename. But by that point I would already be losing any benefit of using an external program instead of doing it myself and falling again into the trap of having to test every case. Link to comment
deanishe Posted June 6, 2021 Share Posted June 6, 2021 (edited) 2 hours ago, vitor said: Also tried making a loop to rename one result at a time and thought about changing directories before doing the rename. IIRC, the way to do it is to recursively collect all the filepaths, sort them (this puts every parent before its children), then process them in reverse order. But yeah, that won't work if your rename program is altering more than the last path component. Edited June 6, 2021 by deanishe Link to comment
vitor Posted February 23, 2022 Author Share Posted February 23, 2022 Update. Rewrote the Workflow in JXA and added quality of life improvements. Now you’ll get feedback when typing the new name, and if the desired target already exists it won’t let you proceed (previously it appended the date to the name). To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. cands 1 Link to comment
vitor Posted December 19, 2022 Author Share Posted December 19, 2022 (edited) Updated to 2022.2. Workflow is now distributed via the Alfred Gallery. Download the new version from there or update directly from Alfred.New repository.New icon.New About.Remove OneUpdater in favour of Gallery updating. Edited December 19, 2022 by vitor Link to comment
vitor Posted March 17, 2023 Author Share Posted March 17, 2023 Updated to 2023.1. Option to reopen Universal Actions panel after renaming with ⌘↩. AlfredForDan 1 Link to comment
vsgbd Posted August 27, 2023 Share Posted August 27, 2023 I just installed the workflow, but Rename doesn't appear in the Universal Actions list. What should I do ? Link to comment
vitor Posted August 27, 2023 Author Share Posted August 27, 2023 Welcome @vsgbd, I’ll need a bit more information. How exactly are you calling it? A short video may help. Link to comment
vsgbd Posted August 27, 2023 Share Posted August 27, 2023 I select the name of the file to rename, type my selection shortkey, get the list of actions, type rename, but don't find it in the list. https://share.cleanshot.com/LCq56rX9 Link to comment
vitor Posted August 27, 2023 Author Share Posted August 27, 2023 You’re acting on the text of the filename. You have to do it on the file. Link to comment
Fabio Posted November 24, 2023 Share Posted November 24, 2023 Hi! How do you get the 'feedback' on the new name? I'm trying, for example, renaming a filename with spaces, and it would be great to get a suggestion for the new name... Thanks!! Link to comment
vitor Posted November 24, 2023 Author Share Posted November 24, 2023 @Fabio I don‘t understand the question. The name is whatever you type in the input field, and the subtitle shows exactly what it will be named with the full path and extension. Link to comment
Fabio Posted November 24, 2023 Share Posted November 24, 2023 Hi, Vitor. Sorry for being not so clear. Some posts above, you mention "Now you’ll get feedback when typing the new name,". So, I thought the workflow would suggest names, based in some rules. For example: 1. original filename: 'some name for this file.pdf' 2. when using your workflow, it could suggest some different names: - 'Some Name for This file.pdf' - 'SOME NAME FOR THIS FILE.PDF' - 'some-name-for-this-file' Thanks! Fabio P.S.: How about allowing the use of another workflow to make these transformations an 'input' for your workflow? Link to comment
Belfong Posted January 11 Share Posted January 11 I just want to echo my thanks for this action. Very useful and odd that it was not in Alfred itself. Thank you. I feel that the way I use it is inefficient, maybe I am not understanding how Universal Action works in general: 1. I search for a file name in Alfred. Alfred gave me 5 results. I want to rename all 5 files. 2. I highlight the first file and tap Ctrl twice. This opens up Universal Action and I choose rename. Changed the filename and press Enter. 3. File is change, Alfred disappear. Now I have to Cmd Space and invoke Alfred and start steam 1 all over again. Is there a better way to do this i.e. rename, then go back to the list of 5 results and move on to the next file to rename? Link to comment
Stephen_C Posted January 11 Share Posted January 11 See this Alfred help page about the File Buffer, which includes the following: Quote The File Buffer allows you to select multiple files and add them to a buffer. You can then take action on all of these files at once! Stephen Link to comment
Belfong Posted January 11 Share Posted January 11 Re: File Buffer: 1. I don't want to rename 5 files under same name. File Buffer seems to be performing the same action on all 5 files in the Buffer 2. If I do an Alt - right arrow to action on these files, I can't see the Rename workflow (I only see it when I double tap Ctrl). I think this is probably something I might have turned off years ago.. Link to comment
vitor Posted January 11 Author Share Posted January 11 Thank you for the kind words. You can only rename one file at a time. Renaming multiple is a complex action usually involving some kind of sequencing, and renaming multiple to entirely different things even more so. I’ve never seen a way to do it that I found ideal, neither in GUIs nor in CLIs (and I wrote some, too). The ones that get close still require understanding the rules beforehand. It would also be incompatible with the feature to reopen the Universal Actions panel after renaming, which I find immensely more valuable and have a need for significantly more often. I don’t intend to add the feature unless the solution is so good and clear to regular users that it’s worth a rewrite of the workflow (which likely would need to happen). Link to comment
Belfong Posted January 11 Share Posted January 11 8 minutes ago, vitor said: It would also be incompatible with the feature to reopen the Universal Actions panel after renaming, which I find immensely more valuable and have a need for significantly more often. This would be extremely useful but if it's not how Universal Actions panel is intended, then I guess we have to make do. How about returning back to search after the renaming? That way, the user can arrow key down to the next file for renaming. Link to comment
vitor Posted January 11 Author Share Posted January 11 It can’t return back to search because it doesn’t know you got there through search. You could’ve selected files in the Finder, or used a custom File Filter, or Script Filter, or gone through the navigation pane, or any other combination. This workflow is meant to be flexible and work from any place. What you’re asking for is specific to your usage so you’d need to make a workflow which behaves that way. Link to comment
Belfong Posted January 11 Share Posted January 11 Hmm, that’s right. I’ve forgotten that I could trigger Universal Action from a Finder window. Thanks for the workflow. It works for what it is made for and I’m thankful. Saves lots of time especially with the files being every where. vitor 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