Complex Batch File Renaming With Shortcuts and Regular Expressions

  Рет қаралды 9,831

macmostvideo

macmostvideo

Күн бұрын

Пікірлер: 41
@bevintx5440
@bevintx5440 Жыл бұрын
Thanks, I always enjoy learning more about Shortcuts.
@artysanmobile
@artysanmobile Жыл бұрын
Batch renaming is often the killer feature that makes a good app great. At its best it is an interactive script suggesting actions to the user along the way. From my database coding I recall seemingly infinite ways it could go wrong as well as the disaster that can result without ‘escapes.’ A full undo is a major piece of coding. It took Pro Tools - a major professional application - years and many versions to finally get it right. It’s not that the math is tough, instead it is about the concept. Why are you renaming? What do you want the result to do? Does it look inside folders? (yikes!) Where do the changed files go? And how do I get out of an unintended mess? That last one should never concern the user, but it does anyway. I haven’t yet watched and checked this but I definitely will. Thanks, macmost!
@artysanmobile
@artysanmobile Жыл бұрын
I watched and was reminded that I used Script Editor (Apple Script) frequently and for decades yet have never succeeded in using the ‘user-friendly’ Automator App. In Script Editor, I jot down in plain English what I want to automate. Then I adapt the plain English with near-plain English Script commands to get me close, and finally debug it, which can be quite simple. Things like Start, Get, Set, Put, If, Else, While, Then, and End are typical plain-English terms in Apple Script and we all know their basic meanings. We do need to learn the syntax, but there are loads of reference guides, and we can just cut and paste them the next time, also like plain English. And, we can build one action at a time, editing and improving the whole thing just like a writer does. I know it sounds like a bad day in hell for some, but I have to say I prefer it. In Automator, I have to start out ‘shopping’ the app for functions I can use. That’s a dealbreaker for me right away and strikes me as very user UN-friendly. I’m not surprised an increasingly dumbed-down macOS could bring us Automator. The idea seemed to be that a new language is a no-no, but scrolling a list of arcane actions and functions to see if any is what Apple thinks I need is far worse. An analogy would be that Automator’s ‘words’ are paragraphs. You better hope they are what you wanted. Script Editor does anything one can imagine with great online and offline references to help, and snippets can be cut/copy/pasted like text. Further, Apple Script uses the language many of us use all day, with verbs, subjects, conditions, and simple math. Neither one is a walk in the park, but I see very little use of Automator which to me says they blew it. Scripting is the solution either way, but I like my odds better when I don’t need to use a short list of ‘words’ Apple gives me. An AI-enhanced editor would be time better spent if Apple wants its users to script.
@GertVeltink
@GertVeltink Ай бұрын
Many thanks, that is a superb explanation! Short and to the point! Like it a lot!
@BrettWignall-g4g
@BrettWignall-g4g Жыл бұрын
Thanks Gaz, great shortcut and insight into using regular expressions - renaming files with yyyy-mm-dd - prefix would replace alot that hazel does - wow thanks again 🖥
@jimalix6270
@jimalix6270 Жыл бұрын
Amazing that Shortcuts can do this! I've been looking for an easy way to do just this task. I just need to brush up on regex!
@ПотужнийНезламізм
@ПотужнийНезламізм 11 ай бұрын
Great video, never used Shortcuts before!
@loisskiathitis8926
@loisskiathitis8926 Жыл бұрын
A very useful and informative video tutorial today! Thank you, Gary! 👏❤️
@1935Charm
@1935Charm Жыл бұрын
Hi Gary - I'm a new subscriber to the channel and am so impressed with the quality of your videos and the breadth of your knowledge. I'm a lapsed UNIX system administrator (it's 30 years in the rear view mirror now!!) and fall into the category of "know it can be done but can't remember how". I mirror the sentiment already expressed here that shortcuts and regex (like sed, awk and all the other power tools) are powerful and useful, but really need to be practised regularly to be remembered at times of need. I wonder whether Tim Cook and co are planning AI integrations such that you could ask Siri to write a shortcut like this. How cool would that be?!! Keep up the good work 👍👏
@puneetsood148
@puneetsood148 Жыл бұрын
Thanks Gary. Your videos helped me transition from windows to Mac. Shortcuts are really great and powerful but I believe I am not utilizing this feature fully. Do you know if there is a detailed resource to understand shortcuts syntax? Like In this video you came up with this expression but I didn’t even know something like this existed. Once again thanks for teaching me Mac.
@macmost
@macmost Жыл бұрын
Regular expressions are a huge topic. There are literally entire books about them. So don't expect to "master" regular expressions unless you use them as part of your job or something. Instead, just learn to use resources online to find expressions that do what you want or are close enough that you can modify them. But regular expressions aside, I have many tutorials on Shortcuts here (and a course too, if you are interested).
@BradMerkel-BLKB
@BradMerkel-BLKB 4 ай бұрын
Thanks for the video, very helpful. I'm struggling to find a way to rename two separate text strings in a file. For example, I want to find and replace the same first word in the file name with "ABC" and then another word that appears in all files with "XYZ". I currently have a second "Replace" action in the flow immediately after the first Replace action but only the first Replace action executes. Any help or insight is appreciated. Thanks!
@macmost
@macmost 4 ай бұрын
Hard to know where you could be going wrong without seeing it, put perhaps you are starting with the original name, changing it, and then changing it again, but then taking the result of the first change and using that as the new name.
@dwilliams1823
@dwilliams1823 6 ай бұрын
Hi Gary, looks really clear and helpful. But one thing I'm stuck on. I can't find the 'period' key to insert between Updated Text and File Extension in the Rename line. Hitting the period key on my keyboard doesn't work.
@macmost
@macmost 6 ай бұрын
Make sure you have a blinking text cursor before typing. You have to click on the precise spot after that first term in the action. Keep trying. When you see a cursor there, then you can type.
@victormedina2269
@victormedina2269 Жыл бұрын
Is it possible to change an all caps file name to one which only the first letter of each word is capitalized and the others are small letters? Have you done a video on this particular scenario? Thanks
@macmost
@macmost Жыл бұрын
You could do that with a complex Terminal command, I suppose. Or a complex Shortcut. Not sure of your skill with either command line or Shortcuts so I don't know how hard that would be for you to make.
@andreabolldorf675
@andreabolldorf675 10 ай бұрын
Great Video - just getting my feet wet with Mac and the Shortcuts. I wonder how I would change your shown steps to renamen a numered files with a names from a spreadsheet list. Do you happen to have somehting recoreded so that I can learn it? Thanks a bunch and keep up your super great tutorials.
@macmost
@macmost 10 ай бұрын
That would be more complex as you'd need to read the data, process it, then apply it. I don't have a video on that specific niche task. It will take some coding know-how to get it done.
@davidhavemann9303
@davidhavemann9303 Жыл бұрын
Is there a way to pull out details from the file and use them for renaming? For example, renaming the file to its creation date? This would be useful for photos. Thank you for all that you do, Gary. I always learn something from your videos.
@macmost
@macmost Жыл бұрын
kzbin.info/www/bejne/mGSWmqVse7-Aors
@murilocallegari3502
@murilocallegari3502 Жыл бұрын
My friend i use token and every time i insert token in mac i need to open an app to make a login. I'm trying to make an automation so that when I put the token, the app automatically opens by itself. Unlike a pendrive, the token does not mount a partition, which makes it difficult for me to find an automation that recognizes it. Do you have any idea of ​​the correct way?
@macmost
@macmost Жыл бұрын
So is "token" a brand name for a USB flash drive or something? Or is it something else? Either way, there's no way to automate that with Shortcuts on a Mac. Maybe the third-party app "Shortery" can do it?
@murilocallegari3502
@murilocallegari3502 Жыл бұрын
​@@macmost token is like a "pendrive key" insert in USB... "smart key usb" Im need plug and read to used in login for the system unlock.. But the MacOs no "see" and mount drive... only alert small msg, i need open the app, for me used app PJE name... But im think automator to open for me all time..
@macmost
@macmost Жыл бұрын
@@murilocallegari3502 sorry I can’t help with that as I don’t have that device. If contact the manufacturer for support.
@jimorlowski5051
@jimorlowski5051 Жыл бұрын
Can this procedure/tool be used for recovering deleted fils on a Lexar SD card? (Yes, before you ask, I did delete in error the photos on a SD card in MAC Photos. Hoping I'm not the first and some know how to correct it.)
@macmost
@macmost Жыл бұрын
Recovering? This really doesn't provide any way to "recover" lost files.
@PaulM_aka_4c21
@PaulM_aka_4c21 Жыл бұрын
Very nice !
@ebatalha
@ebatalha 2 ай бұрын
I just tried this under iPadOS and it does not work. The only change I made was to be used input from Share Sheet, instead of Quick Action. Any ideas?
@macmost
@macmost 2 ай бұрын
Not sure. Play around with it. But keep in mind it was designed for Mac, so you may have to adjust to use it on an iPad.
@ebatalha
@ebatalha 2 ай бұрын
@@macmost Thanks Gary! Yes, I've been trying but so far it runs and nothing happens. Not sure if it's the regex syntax or something else. I will try a few more options and post back here. Thanks again.
@desertpatient
@desertpatient Жыл бұрын
Thanks bunches
@hubblebubble9351
@hubblebubble9351 29 күн бұрын
Na toll, in der deutschen Version sieht unter Kurzbefehle mal wieder alles anders aus.
@RaveendraMadusshan
@RaveendraMadusshan Жыл бұрын
Thank you very much
@PRECIADOR
@PRECIADOR Жыл бұрын
TOO COMPLICATED
@macmost
@macmost Жыл бұрын
Not every tutorial I make is going to be for everyone. I try to produce tutorials of various levels.
@PRECIADOR
@PRECIADOR Жыл бұрын
@@macmost VERY TRUE. YOUR TUTORIALS HAVE HELPED ME IN THE PAST. IT WOULD BE NICE TO MAYBE AT THE BEGINNING OF A VIDEO TO HAVE A RATING OF DIFFICULTY TO AN AVERAGE PERSON. (FOOD FOR THOUGHT) LIKE LEARNING A NEW LANGUAGE. 😇 PLEASE KEEP PRODUCING.
@PRECIADOR
@PRECIADOR Жыл бұрын
@@Fair_dinkumGROW UP. IT SIMPLY EASIER TO USE ALL CAPS, INSTEAD STOPPING TO CAPITALIZE CERTAIN LETTERS. THIS IS A GREAT CHANNEL WHOSE ADVICE I'VE USED. GIVING IMPROVING CUES, DOES NOT HARM ANYONE MATURE. 😇
@macmost
@macmost Жыл бұрын
@@PRECIADOR a level rating would be difficult to do because it is so subjective. What one person sees as advanced would be beginner level for someone else.
@PRECIADOR
@PRECIADOR Жыл бұрын
@@macmost NO WORRIES. THANKS FOR REPLYING BACK 👍🏼
@garrysingh4484
@garrysingh4484 Жыл бұрын
Good one !!! But ☝️ i think performing this rename using "Shell Script" is much 🤏 simpler, and flexible
7 Ways To Type Currency Symbols On a Mac
9:21
macmostvideo
Рет қаралды 8 М.
You Are Using These Folders On Your Mac Wrong
11:18
macmostvideo
Рет қаралды 220 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 4,6 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 14 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 34 МЛН
Window Arrangement Tips Every Mac User Should Know
15:01
macmostvideo
Рет қаралды 60 М.
Shortcuts To Help You Organize Your Files
14:43
macmostvideo
Рет қаралды 15 М.
Automators 8: Keyboard Maestro to Rename Files with Patterns
11:09
iPad Tips for Seniors Four Great Shortcuts!
11:52
Rich Bowlin
Рет қаралды 102 М.
Top 10 Things Users Don’t Know They Can Do On Their Mac
10:05
macmostvideo
Рет қаралды 63 М.
11 Smart Folders To Make You More Productive On Your Mac
10:34
macmostvideo
Рет қаралды 89 М.
What are Shortcuts and How to Build Them - Shortcuts 101
18:06
Christopher Lawley
Рет қаралды 276 М.
How To Organize Files On Your Mac
11:39
macmostvideo
Рет қаралды 133 М.
I'm switching to Mac, after a lifetime of Windows
18:12
Fstoppers
Рет қаралды 1 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 4,6 МЛН