Jump to content

Rename Action — Rename files and folders


Recommended Posts

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

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
  • 1 month later...

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!

Link to comment

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

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

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
  • 3 months later...
  • 2 months later...

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

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

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

 

 

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

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

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
  • 2 months later...
  • 2 years later...

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

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

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