Jump to content

Rename 4.0 beta 2 for Alfred 3: Batch Rename files or folders (supports Regular Expression and EXIF date)


Recommended Posts

  • 1 year later...
  • 1 month later...

Hi,

 

I installed the 4.0 beta 1 for Alfred 3 and when I invoke both by keyword and file action, I get "Processing…Please Wait" for a few seconds and then reverts to default search options.

 

 

Can you please give me more details?

 

How many files did you select in Finder?

 

What kind of files did you select in Finder?

 

Thank you.

Link to comment

I apologize. I was working on giving you more details and noticed something else funky with Alfred (selecting a folder in the Alfred window wouldn't open it - nothing happened) so I restarted my machine and now both issues are resolved. The workflow is working great! Thanks.

Link to comment

I apologize. I was working on giving you more details and noticed something else funky with Alfred (selecting a folder in the Alfred window wouldn't open it - nothing happened) so I restarted my machine and now both issues are resolved. The workflow is working great! Thanks.

 

 

I’m glad to hear it is working.

Link to comment
  • 3 months later...

Rename looks incredibly awesome. I can appreciate all you put into it, and am grateful it's available for free.

 

I am learning regular expressions right now, but am admittedly not there yet, and I'm having an even harder time integrating it into a working command line for Rename. I was wondering if you would mind offering a quick bit of help here...

 

I have 400 image files in a folder that need to be renamed in bulk. They all share the same format:

 

Yada yada yada - IMG_1234.CR2

 

Yada yada yada could be any string of any length.

Space before and after the hyphens are consistent across all files

- IMG_ appears in every single file in that position

1234 could be any 4 digits including zeros, but it is always exactly 4 in length

There is never anything after the 1234 digits except a period and the extension

 

I want to rename the files to:

 

Mendenhall Glacier - EXIF capture date - 1234.cr2

 

The Mendenhall Glacier string would be the same for all files.

The EXIF date I believe I need to use $cmm, but I'm not sure how to work that into the regex

The 1234 should be whatever the original 4 numbers are

The capitalization of the extension I intentionally want to now make lowercase

 

 

What would my full Rename command line look like to accomplish this? GREATLY appreciate your help!

Edited by shadowfax1
Link to comment
  • 3 weeks later...
On 16/10/2016 at 9:56 PM, shadowfax1 said:

Rename looks incredibly awesome. I can appreciate all you put into it, and am grateful it's available for free.

...

What would my full Rename command line look like to accomplish this? GREATLY appreciate your help!

 

Did you figure it out?

 

Please, let me know.

Link to comment
  • 1 month later...

First, thanks for such an awesome workflow. I have absolutely loved this.

 

About a month or so ago, it really slowed down for me. A selection of only 9 or 10 Finder items usually takes about 90+ seconds to preview before the "Apply Now" menu item appears, then it takes another 90+ seconds to actually rename the items. Currently using the most recent Alfred version and Rename 4.0 beta 1 on El Cap (10.11.6) I'm not sure if I've changed some weird setting somewhere? I have an iMac and a MacPro, and the workflow is about the same on each.

 

Any thoughts? Thanks again.

Link to comment
  • 3 months later...
  • 10 months later...
  • 1 year later...
On 6/4/2019 at 8:09 PM, macroni said:

Absolutely love this workflow! Any chance it will be updated for Alfred 4? (It seems all of the scpt files reference Alfred 3 specifically, which it tries to launch when called from Alfred 4.)

Thanks!

 

I’ll update the workflow as soon as possible. Thanks. 

Link to comment
  • 4 months later...

I'm on macOS Catalina 10.15 and Alfred 4.05, and I can't get this workflow to work at all. I did have to allow Alfred to have Full Disk Access, Files and Folder access, and Automation access, but that still didn't allow it to function.

 

I applied a possible fix for the q_workflow.scpt and changed the 7th line:

set my _data to (POSIX path of (path to home folder)) & "Library/Application Support/Alfred 3/Workflow Data/" & (bundleid) & "/"

to the following:

set my _data to (system attribute "alfred_workflow_data") & (bundleid) & "/"

But it didn't seem to make it work. I tried it with a single file and with multiple files selected. Essentially, when I have a file selected and select Rename, Alfred just disappears and nothing happens. Maybe the fix isn't quite right?

 

Any help would be appreciated. This looks like such a useful workflow for Alfred and I've been looking for something like this for quite some time. It wasn't until recently that I realized Alfred can perform file operations. 🤦‍♂️

Link to comment
4 minutes ago, deanishe said:

 

That's the wrong path. The alfred_workflow_data variable is specific to the workflow and already includes the bundle ID.

 

Thanks for the reply. I tried it without that piece and I get the same result.

 

Is there a way to view any sort of logging for a workflow? Maybe I can track down where things are going wrong.

Edited by dionmunk
Link to comment

I've updated the workflow to work with Alfred 4 and macOS Catalina. All original lines of code are still in all of the script files, just commented out, with my modified lines below them.

 

Download: Alfred 4 - Rename 4.0 beta 2

 

I do have a feature request, though. It would be awesome if each captured piece of the filename could have the {find@@replace}{-modifiers} applied to it. So I could do something like the following:

 

File List:

This.Is.A.File.Name.For.A.Movie.MP4
This.Is.Some.other.FILENAME.blah.mp4

Rename RegEx:

(.*)\.(.*)@$1{\.@@ }{-t}.$2{-l}

Results:

This is a File Name For a Movie.mp4
This is Some Other Filename Blah.mp4

This would honestly make the workflow perfect imo. Haha.

 

Anyway, awesome workflow. Thank you for your work Carlos!!!

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