Is there a macro to select the next line item in a finder folder.
The way I read your question it sounds to me like you're asking for an action to simulate a Down Arrow Keystroke. But it is not at all unlikely that I am misunderstanding you, so you might have to elaborate further to make me understand.
Type a Keystroke.kmactions (551 B)
Thanks. That worked
Yes, that is what I needed. I download hundreds of movies and series from Pirate Bay, and the sites come in many forms. So I created an Apple FileMaker Pro database called Sotae Text Editor that will change them all to the titles to the same form. The problem is that many of the series are very long and this requires clicking back and forth from the database to the actual file title for hours, copying and pasting the fixed titles to the actual file. So I am prying to use Keyboard Maestro to automate the sequence. I am new to Keyboard Maestro but I am getting better at it every day. So far I have this sequence. So far it works, but I still have two steps that are needed. One into click the selected title, and the other is to have the Keyboard Maestro repeat down the finer list of files.Clicking the image copies the corrected title in the database, be it takes a click on the actual file title and a paste step to change it.
Wouldn't it be simpler to use a file renaming tool that batch renames files?
I never heard of something called a file renaming tool, and that is why I created one using a database. Here is the format that I like "Have Gun Will Travel - S01E01 - Three Bells to Perdido.avi”, and in title case. But the series episode titles download with parentheses, commas, names of the actors, foreign landuages, and so many other formats. I could send you the one that I created, but you would need a copy of Filemaker Pro to open it.
There are all sorts of batch renaming apps out there, including a (limited) one built into Finder—just select a number of files, right-click, and select Rename. But its capabilities are limited. Automator can also do it, though still with limited capabilities.
You want one that lets you use regular expressions to manipulate filenames. This makes it relatively easy to set up what you want. But it will take some experimentation and learning to figure out which app works best for how you work and your needs ... but it will save hours over trying to tediously rename every file with a mixed manual/automatic method.
I have been using the Apple Filelmaker Pro for many years, and I download many movie series from Pirate Bay. But the titles of the series come in many forms. I am trying to make them all use the same format. I have created a Filemaker database that does it. I need to get the titles from Filemaker to the finder folder. I can do that with copy/paste, but some of the series like Gunsmoke went on for over 20 years, and copy/paste takes hours to do.
They come in like this:
But My FM mkes them look like this:
Two And A Half Men - S08E08
Two And A Half Men - S08E09
Two And A Half Men - S08E10
Two And A Half Men - S08E11
Two And A Half Men - S08E12
Not really. Mostly people trying to get me to buy some other program, instead of helping me get familiar with Keyboard Maestro.
Danny, part of the problem is, I think, we have absolutely no idea what your FM Pro database looks like. But using the database to rename the files manually—or even programmatically via Keyboard Maestro—is not the right way to go.
Sure, it could be done, but what you are looking for is a batch renaming program. I believe most of the ones I pointed out have trial versions, so download one and see what you can or can't do with them.
You could still incorporate FM Pro, if you wanted: Have it display the filenames for a given set of files you want to rename in a text box. Most of the renaming programs should support renaming from a list—either pasted in, or in a text file. Make sure the new names are in the same order as the files you want to rename, and then just paste in (or open the file containing) the new names.
Sure, you could possibly script something to do this in Keyboard Maestro, but it's going to be convoluted and probably involve GUI manipulation. Or you'd have to use shell script commands to speed the process.
I am not forcing you to buy another program. But what you have are a large number of files that need to be renamed, and there are tools out there written expressly for that purpose. As one example, using our app (because it's the one I know, not because it's the one you should use)...here are your example files renamed, all done within a renaming app:
Much more complex things are possible, of course.
I am not trying to use KM to renames the files. I am only trying to move the already name changes to the original files, and learn what KM can do, so I can use it for other things, since QuickKeys no longer supports OSX.
Here are some screen shots of the FM file that I have created:
Question: Can you get the list of new filenames in a window in FM where the text can all be selected and copied?
Yes, and you can select all, one line or just a few characters. By making the selection you see in blue on this picture snd clicking on the Replace button.
You go to this layout where you enter the replacement text.
Then when you click on replace you get this:
As you can see there in now a minus character separating the title and the series number. There are many more things that you can do, like changing all of the text to title case. You can see many of those int this picture:
I can get the titles back in the original text, but doing a copy/paste takes too much time. I was hoping it could be down using KM.
It can be. The attached macro is a proof-of-concept that shows it works, and you'll just have to do a bit of work to integrate it into your FMPro macro. Basically, you need to get that list onto the clipboard, in the plainest of plain text formats.
Get your macro to do that, then you can use the attached macro as the starting point after the step that puts those names on the clipboard. This version runs off a fixed list, but explains how to change it to work with your data.
- Macros are always disabled when imported into the Keyboard Maestro Editor.
- The user must ensure the macro is enabled.
- The user must also ensure the macro's parent macro-group is enabled.
- macOS 13.6.4 (but should work on 14.x)
- Keyboard Maestro v10.2 (but should work on 11.x)
Here's the "before" picture of my folder:
I run the macro, and it first asks me to open the target folder, and then warns me:
That's a very important warning, because what happens next simply happens. If you have a typo, it becomes part of the filename, etc. So don't use this without either a good backup, or a good plan on how to recover your filenames in case something goes wrong.
After the warning, the renaming happens, then the folder is opened in Finder. Here's the after:
And the most critical thing to remember of all of this: The replacement happens on a line-by-line basis. So
My TV show - S01E01 [4K ATMOS].mov, etc. The order of the filenames in Finder must match the order of the list of new filenames from FMPro.
There are many ways this can be improved, i.e. handling of extensions, making sure the file count in the destination matches the line count in the list, etc. It could even show a "preview" of sorts, showing which old file will become which new file. However, this should be enough to get you started.