oderwat Posted April 3, 2013 Share Posted April 3, 2013 (edited) Well there was a feature Request for adding "Rename File" to the internal commands on files here: http://www.alfredforum.com/topic/1675-add-a-rename-action-to-the-file-action-list/ David Ferguson quickly replied with an custom workflow (with some smart Alfred magic making Alfred calling search on itself!) But his version was a bit raw and limited to files only. So I enhanced it as follows: 1. It uses "mv" instead of cp / remove. This way it will work on folders (and bundles). 2. I made it so that the original name is the default when you rename a file. 3. I added Alleyoop update to it as I may enhance / debug in the future. You can get my "Rename File" workflow version from here: https://github.com/oderwat/alfredworkflows/raw/master/Rename%20File.alfredworkflow V1.1: Visible rename confimation. Fixed renaming of files with spaces in name. CMD Return on rename now copies the resulting file path to the clipboard. Upgraded Alleyoop code too. All my current workflows are available here: https://github.com/oderwat/alfredworkflows Edited April 12, 2013 by oderwat thec13 and bcometa 2 Link to comment
vdesabou Posted April 5, 2013 Share Posted April 5, 2013 Thanks, great workflow, I use it a lot! I've just added on my side a Notification at the end and a Copy to clipboard with the new file name in order to quickly browse it in Alfred if I need to Link to comment
hzlzh Posted April 5, 2013 Share Posted April 5, 2013 Great one, rename now become easy. Link to comment
bengr Posted April 6, 2013 Share Posted April 6, 2013 (edited) Thanks for the workflow, this is the first one I found that actually works (for the most part, see below). Please note that if you're trying to rename a file with more than one word, you only get the first word as the default "rename-to" filename. I don't have much time to look at the code and try to fix it unfortunately, but I'm sure you'll push an update fixing this soon enough, shouldn't be a huge bug to fix, considering the renaming works fine, just the preview doesn't "populate" with the default filename properly. Edited April 6, 2013 by The_Ben Link to comment
jbucchieri Posted April 9, 2013 Share Posted April 9, 2013 thanks for the workflow. is there anyway to make the font smaller so that the entire original filename can be displayed in the alfred window? j Link to comment
Subject22 Posted April 9, 2013 Share Posted April 9, 2013 thanks for the workflow. is there anyway to make the font smaller so that the entire original filename can be displayed in the alfred window? You'd have to change the font size for everything. Alfred Preferences > Appearance > Theme then cmd+shift+click on the text you want to make smaller. Link to comment
vdesabou Posted April 10, 2013 Share Posted April 10, 2013 Thanks for the workflow, this is the first one I found that actually works (for the most part, see below). Please note that if you're trying to rename a file with more than one word, you only get the first word as the default "rename-to" filename. I don't have much time to look at the code and try to fix it unfortunately, but I'm sure you'll push an update fixing this soon enough, shouldn't be a huge bug to fix, considering the renaming works fine, just the preview doesn't "populate" with the default filename properly. As I have a lot of files with spaces in it, I'm proposing a fix for this issue, see http://d.pr/f/LY6A @oderwat can you validate my fix and include it in yours ? Hope this helps Cheers Link to comment
oderwat Posted April 12, 2013 Author Share Posted April 12, 2013 Hey @vdesabou! I modified "my" version of the script to handle the spaces in Names, grabbed that visible message idea and made the clipboard copying optional when you press CMD on rename (I hate to mess up my clipboard as side effect). I did not add your extra script cause I like to have the things "visible" so others can check it out and use part of it. Still not tested very much! I am not sure if all escaping works as expected. There may be still problems with some filenames. Link to comment
vdesabou Posted April 12, 2013 Share Posted April 12, 2013 Hey @vdesabou! I modified "my" version of the script to handle the spaces in Names, grabbed that visible message idea and made the clipboard copying optional when you press CMD on rename (I hate to mess up my clipboard as side effect). I did not add your extra script cause I like to have the things "visible" so others can check it out and use part of it. Still not tested very much! I am not sure if all escaping works as expected. There may be still problems with some filenames. Yeah no worries, I forgot I added that on my side :-) Cheers Link to comment
spacecadet9 Posted April 17, 2013 Share Posted April 17, 2013 Hi I can't seem to see this workflow working at all! What is the best way I can debug it to see what's going on? Thanks Link to comment
sudopeople Posted September 10, 2014 Share Posted September 10, 2014 Awesome workflow! Thanks very much for sharing. Link to comment
rounak Posted August 21, 2016 Share Posted August 21, 2016 tell application "Alfred 3" to search "to: {query}" Modification required to work with Alfred 3 Link to comment
Serge Posted August 21, 2016 Share Posted August 21, 2016 tell application "Alfred 3" to search "to: {query}" Modification required to work with Alfred 3 Thanks! Link to comment
Serge Posted August 21, 2016 Share Posted August 21, 2016 And thanks to the author of this workflow. Link to comment
politicus Posted February 23, 2019 Share Posted February 23, 2019 Great workflow! Thanks for sharing! Link to comment
johnathanz Posted June 23, 2019 Share Posted June 23, 2019 Update for Alfred 4: Quote tell application "Alfred 4" to search "to: {query}" Link to comment
proxemics Posted June 26, 2019 Share Posted June 26, 2019 Would there be an easy way to have this hide the file extension? I'm only ever really renaming the file itself, and would be a bit easier if it did not show the file extension, but just the file name... Thanks for the great workflow! Link to comment
deanishe Posted June 26, 2019 Share Posted June 26, 2019 (edited) On 6/23/2019 at 3:40 AM, snowfox said: Update for Alfred 4 Change that to: tell application id “com.runningwithcrayons.Alfred” to search “to: {query}” That should work with v4 and every future version of Alfred, so it won’t need updating for Alfred 5 and later. Edited June 26, 2019 by deanishe Link to comment
vitor Posted June 30, 2019 Share Posted June 30, 2019 On 6/26/2019 at 4:13 PM, proxemics said: Would there be an easy way to have this hide the file extension? Without meaning to hijack the thread, but I’m assuming this Workflow is not well maintained, as evidenced by the last update dates in the repo and users having to post the required fixes in text. I have a Workflow that does the same thing. I have no idea if it works the same to this one interface-wise — until now I didn’t even know this one existed. But some of you may want to try it as it’s well-maintained (and will continue to be for the foreseeable future), and particularly you @proxemics, as it hides the extension when asking for the new name. proxemics 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