vitor Posted June 23, 2013 Share Posted June 23, 2013 (edited) Usage Rename a file or folder via the Universal Action. Press ⌘↩ at any state to reopen the Universal Actions panel after renaming. ⤓ Install on the Alfred Gallery | Source Edited March 17, 2023 by vitor Crushoverride007, thec13, proxemics and 1 other 4 Link to comment
Wildcard Posted June 24, 2013 Share Posted June 24, 2013 Very nice! Odd that this wasn't built in in the first place. One thing: because of the implementation, the keyword "rename to:" now shows up if I'm searching for a keyword or app that starts with "re", which is distracting. ("restart," "adobe reader", etc.) Also, it doesn't seem like that keyword does anything if called directly—does it? I'm not sure how to implement it in applescript, but I think it would be cleaner if there weren't the extra keyword in Alfred. Link to comment
vitor Posted June 24, 2013 Author Share Posted June 24, 2013 Very nice! Odd that this wasn't built in in the first place. Agreed. There’s already a feature request for it. One thing: because of the implementation, the keyword "rename to:" now shows up if I'm searching for a keyword or app that starts with "re", which is distracting. ("restart," "adobe reader", etc.) Also, it doesn't seem like that keyword does anything if called directly—does it? It does not do anything if called on its own, no, and I agree it can be somewhat distracting. I'm not sure how to implement it in applescript, but I think it would be cleaner if there weren't the extra keyword in Alfred. Applescript is not relevant for this, but I absolutely agree, it would be cleaner if there was a way to do this in one go, but unfortunately there is not. It’s not the first workflow where I was forced to use this technique (see LabelColor and RunCommand), and I really dislike doing it this way, it is done due to Alfred’s limitations, as there is currently no other way to chain file actions to get further input. What you can do is change the name to something you wouldn’t usually start a search with, like “%rename to:” — that way you won’t see it as much, if ever, and it has the same result (you also need to change the code in the top right node, to reflect this). Link to comment
vitor Posted June 24, 2013 Author Share Posted June 24, 2013 Very minor update, just a slight simplification of the code to call the window that asks for input. Link to comment
vitor Posted June 27, 2013 Author Share Posted June 27, 2013 Small update. It gets rid of the reference file it creates, after the operation is done. Link to comment
alexwoolfson Posted August 1, 2013 Share Posted August 1, 2013 This is great! (I also really like your LabelColor workflow.) Is there a way to have the current filename pasted in and selected, ready to either tweak or overwrite? I find that when I rename files it's mostly to make small changes to long filenames so having this as a feature would be a big help. Thanks again for the great workflow! Wildcard 1 Link to comment
vitor Posted August 4, 2013 Author Share Posted August 4, 2013 This is great! (I also really like your LabelColor workflow.) Is there a way to have the current filename pasted in and selected, ready to either tweak or overwrite? I find that when I rename files it's mostly to make small changes to long filenames so having this as a feature would be a big help. Thanks again for the great workflow! Thank you for the kind words. Yes, it is possible, although it’s a bit of a hack. Not sure how I feel about it yet, so we can try and see. Simply download the workflow again, it’s now working like you asked. Link to comment
alexwoolfson Posted August 6, 2013 Share Posted August 6, 2013 Thank you for the kind words. Yes, it is possible, although it’s a bit of a hack. Not sure how I feel about it yet, so we can try and see. Simply download the workflow again, it’s now working like you asked. Awesome! Thank you! Unless it causes problems, I hope you keep it. It doesn't cost any extra time (you need no extra keystrokes to type in a completely different name), but it saves so much time if you just want to, say, change a number at the end of a long file name. Thanks again! Alex Link to comment
vitor Posted August 6, 2013 Author Share Posted August 6, 2013 Unless it causes problems, I hope you keep it. It doesn't cost any extra time (you need no extra keystrokes to type in a completely different name), but it saves so much time if you just want to, say, change a number at the end of a long file name. I agree, I’m only ambivalent because it’s kind of a hack (I have to tell System Events to press certain keystrokes to select the text (since Alfred does not support that option) and although it’s unlikely someone will have those keyboard shortcuts set to something else, it is possible. It’s may also be less clear if you don’t see the “rename to: ” text (due to a long filename), that you’re supposed to write the filename there. Either way, it’s on github, so even if I change my mind later, you should be always able to get this version, with this behaviour. Link to comment
roccitman Posted December 2, 2013 Share Posted December 2, 2013 Excellent and simple little action. Thanks Vitor! Link to comment
rspike12 Posted February 8, 2014 Share Posted February 8, 2014 It doesn't work for me in Mavericks any ideas? Link to comment
vitor Posted February 9, 2014 Author Share Posted February 9, 2014 Walk me through the process of what you’re doing. Be as specific as you can (name of the file, how you select it, how you call the action, what appears in Alfred, what new name you’re inputting, everything you can think of). If you can make a video, that would make it ideal. Link to comment
rspike12 Posted February 9, 2014 Share Posted February 9, 2014 This is the video, sorry for the bad quality. It was taken in hurry with my iphone. http://dl.getdropbox.com/u/23761381/example.MOV Simply It doesn't do nothing. In the example I used a pdf file but It happens with every files Link to comment
vitor Posted February 9, 2014 Author Share Posted February 9, 2014 Easy enough to solve. The problem is that you’re not supposed to type the command. This is to be used as a file action, which means you select the file, then press the file action hotkey (I think the default is ⌘+⌥+\), and select “Rename”. Alfred’s window will appear, and there’s where you’ll type the new name (the old one will be selected, in case you just want to perform a small change). Link to comment
rspike12 Posted February 9, 2014 Share Posted February 9, 2014 Ah ok....I feel stupid I didn't understand it was a file action. Do you think is there a way to rename like I do in the video? I think it will be easier cause I don't use so much the Alfred navigation. Link to comment
vitor Posted February 9, 2014 Author Share Posted February 9, 2014 You don’t need to use Alfred’s navigation; as stated, you can select the file and press the file action hotkey. That said, yes, it’s very easy to add a way to rename like you ask, but why would you want to? If you have the file already selected in Finder, simply pressing ↩ will allow you to rename it. Link to comment
rspike12 Posted February 9, 2014 Share Posted February 9, 2014 That said, yes, it’s very easy to add a way to rename like you ask, but why would you want to? If you have the file already selected in Finder, simply pressing ↩ will allow you to rename it. I understand what you mean but I'd love to select my file in the finder, press an hotkey like cmd+alt+R for example and then in the Alfred window I'll rename the file cause I can see the words better and bigger and I'll prefer also if there is not the name of the old file. With this configuration I have to: 1) select the file in the finder 2) press the hotkey for the action 3) delete in the Alfred window the word is already written 4) rename to the new file name Instead I'll love to: 1) select the file in the finder 2) press cmd+alt+R 3) rename to the new file name I know It sounds crazy. Any chance to do that Many thanks for the help Link to comment
vitor Posted February 10, 2014 Author Share Posted February 10, 2014 You don’t have to explicitly delete the name. That’s why it’s already selected, so you can start typing the new name right away. Go here to get a version that works how you want (you’ll have to set up the keyboard shortcut yourself, since Alfred does not keep that when opening workflows). The link will be available for a few days. Link to comment
rspike12 Posted February 10, 2014 Share Posted February 10, 2014 many thanks you're great You don’t have to explicitly delete the name. That’s why it’s already selected, so you can start typing the new name right away. I don't understand this: the name of the file is not already selected, I send you 2 video examples: http://dl.getdropbox.com/u/23761381/IMG_3178.MOV http://dl.getdropbox.com/u/23761381/IMG_3179.MOV Am I missing something? Link to comment
vitor Posted February 10, 2014 Author Share Posted February 10, 2014 If you see the earlier conversations on this post, you’ll see I describe the feature of selecting the old file name as a hack, that could break under certain conditions. It looks like you might meet those, so here’s a version that will work for you, without presenting the old file name. I hope it suffices for your needs. Link to comment
vitor Posted May 5, 2014 Author Share Posted May 5, 2014 Update. It now uses an external trigger, so the rename to: keyword was removed. Link to comment
Easytiger Posted May 31, 2016 Share Posted May 31, 2016 It is not working for me. Anyone else has this problem? Link to comment
vitor Posted May 31, 2016 Author Share Posted May 31, 2016 It is not working for me. Anyone else has this problem? When making a bug report/asking for help, you need to be more specific. No one will be able to help you without context to figure out what is wrong. Are you on Alfred 3? If yes, download the latest version again from Packal. That might’ve been your issue. Link to comment
Easytiger Posted May 31, 2016 Share Posted May 31, 2016 Thanks Vitor! Haven't seen the updated version on Packal. It is working now. Had to replace another workflow, though I found it more convenient that a new window popped up to rename a document. However, this looks good! thanks for the effort. Link to comment
vitor Posted October 5, 2016 Author Share Posted October 5, 2016 Update. It now uses OneUpdater, so this should be the last time you need to manually update. 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