This was a really easy way to do version control for specific projects, I added clearing out the temp folder after a week to save on storage with a separate automator action! thank you!
@sircorn42483 жыл бұрын
Excellent elegant solution! Filter Action is slow and glitchy. Script works much faster.Thank you.
@hansachim90543 жыл бұрын
great video and greetings from Germany! you helped me so much to figure out a way to organise a smart back up to my files and documents for university by setting up a drop folder like this one. definitely perfect.
@martef093 жыл бұрын
Fantastic as usual. Even though I am very experienced, I had not thought to bother with creating this action. It is saving me time and effort.
@y2ksw13 жыл бұрын
This was particularly useful! After years of using the Mac, I am still very noob when it comes to automation.
@g.r.29853 жыл бұрын
You are not alone! Thankfully, there’s this channel!
@stevehof3 жыл бұрын
As always, Gary is da MAN! Such great videos. Perfect pace. Cheers as always!
@daji1952 Жыл бұрын
TYSM best thing for new mac users ! east or west mac is best
@simonroyjonesuk6 ай бұрын
Wow that's really powerful. I had no idea. Thanks very much
@luc917Ай бұрын
great video , thanks for sharing
@zyghom3 жыл бұрын
this was probably too easy for power users and too complicated for ordinary ones however nice to know it exists thank you
@eyeojo3 жыл бұрын
Or a way to make ordinary ones get more power, aka learning;)
@stalinlovsciafbifakemsmzio6674Ай бұрын
Exactly, far too simple, and limited. Not Gary’s fault but Cook has ruined Mac. Nothing works anymore. Thanks Mr Diversity and Inclusion anti-“huuhuhuraaaaaaaysitsts have no business on Apple platforms!!”Captain “EndAllRacismNOW!” Zioglobalistlunatik, St. Cook! Glad you’ve had your priorities right! Hows that ending r-ism going? We need a prog rep, asap! Don’t worry about anything else. Ijit.
@mandeepmails Жыл бұрын
Feels great taking care of custom computing mess smartly. Any Tips to get amazing with shell scripting in few months, Book/exercises etc ? Amazing Video BTW
@macmost Жыл бұрын
Dave Taylor’s Wicked Cool She’ll scripts may be a good place to learn.
@Juliano_DJOL2 жыл бұрын
Wow these are some great tips and tricks, I'm about to automate myself out of things to do lol
@Theodor1st2 жыл бұрын
I would like to do the following: If - when I drop multiple files - there are more than 5 files of the same kind: 1) create a folder named "kind-name" 2) move the files in the "kind-name" folder 3) repeat for all files of the same kind Is my workflow possible? Thank you.
@macmost2 жыл бұрын
Technically possible, but it will; take a lot of work to do it. You'll need to analyze what is in the folder to determine which action to take. It will be complex. Not sure of your programming skill, but I would only attempt if you have some experience with this.
@Theodor1st2 жыл бұрын
@@macmost So this is a challenge! I like challenges! Would you like me to post the script (if I manage to make it work)?
@macmost2 жыл бұрын
@@Theodor1st You should, sure.
@Theodor1st2 жыл бұрын
@@macmost I would love to know what you think of my script. If you're not too busy...
@AlexLunnar2 жыл бұрын
Really awesome Tutorial!! Thanks
@wiwingmargahayu683110 ай бұрын
nice time spending Sir
@letivyshe Жыл бұрын
Thank you so much, great work!
@steveleith79323 жыл бұрын
This is a fun and interesting video.Thanks for sharing your expertise.
@walterrojas27612 жыл бұрын
The kind of stuff to ease your mind
@kcarm322 жыл бұрын
Hi Gary. This video really helped me out. I set up Automator to back up my Filemaker Server Database backups to a networked computer. Could you do a video about how to backup files using Launchd? I'm trying to change from using crontab and rsync to Launched. The struggle is real! Thanks for posting these videos!
@Greg00020 Жыл бұрын
a thing i use folder actions to do is auto unzip a zip file added into download folder
@GMBethHarmon3 жыл бұрын
How can I do this using the "where from" metadata attribute in Mac? For example, if I downloaded a file from site A, I want it to be moved to folder A. If I downloaded a file from site B, I want it to be moved to folder B. (BTW, "where from" can be seen by right-clicking a File > Get Info. I don't think "Where From" is actually attached to the file itself - it's an extended attribute on the Mac file system.)
@macmost3 жыл бұрын
Offhand I don't know if that is accessible to you in a script.
@GMBethHarmon3 жыл бұрын
@@macmost Unfortunate, but thanks. I guess I'll have to find some extension that changes the filename on download first.
@timcash6372 Жыл бұрын
Gary your videos are second to none but I have a question can I create an Automator to get files from a raspberry pi and place it in a folder on my Mac Thanks Gary your videos ROCK
@macmost Жыл бұрын
I don't know how Automator would help you in that situation. Have you established file sharing with your raspberry pi? You'd need to do that first. Then Im not sure what you'd want Automator to do that you wouldn't do in just the Finder to transfer the files.
@diet3 жыл бұрын
Gary, hello. Thanks for your lessons. Do you have any ideas how to make that in automator? Perform the action after the program is fully loaded
@macmost3 жыл бұрын
Not sure what you mean. I am showing this with Automator.
@Jonaros2 жыл бұрын
Great video! Inspired me to make a folder action to filter out mp3 files I am creating with a music software to be copied into a Google Drive folder so I can listen to them later online. Those files are being created into subfolders within my main folder, and it seems to be a problem for the action to run. Some files have been found and some in other subfolders have not. I don't get what the problem is..
@pierrejacoub87783 жыл бұрын
Is there any way to use some kind of Mac macro to interact with a certain webpage and actually generate and save recurring reports? (Select from drop downs, click on buttons, save the report generated, etc...)
@frankiecao442 Жыл бұрын
Thank you for the helpful video. Is there any way to edit file permission via AppleScript?
@macmost Жыл бұрын
Maybe. But using shell scripting would be the way to go for that.
@InsightKnowlege9 ай бұрын
Hi Garry, Just watched your video and it's fantastic. I am new to Mac and need to solve a problem. I have a weblink supplied by my supplier where I need to download stock inventory level every day from a link. the file is a csv file. Is there any option in Automator that if we have a link to download a file it automatically download that file every 24 hrs to a specific folder? Kindly advise. Thanks once again and keep posting great tutorials. Cheers
@macmost9 ай бұрын
Automatic means using shell scripts with a CRON, or using a third-party app to launch the automator task (or Shortcut) on a schedule.
@bakhtyarshwani99766 ай бұрын
Hi, is there posible to make a shortcut that make a folder action for organizing and moving files to other places in the mac
@macmost6 ай бұрын
Only Automator has Folder Actions.
@cl24222 жыл бұрын
Amazing! Is there a way to use wildcards (*) to determine what path to send a file to? For instance, if I know the destination folder based off my file name, but that folder could be in any number of super-folders?
@gm33173 жыл бұрын
Is there a way in Automator to move a folder to a destination folder via a "drop zone" folder?
@jebl88883 жыл бұрын
Yes, because the Filter Finder Items can be a folder instead of a file. "Kind is Folder"
@ux4861 Жыл бұрын
Thanks for the video. I have recently trained a core ml file, so a .mlmodel file, how do i incorporate it into the automator to help me look for certain images in a folder based on input search word?
@macmost Жыл бұрын
I don't think Automator works with core ml files at all.
@CarltheRiver3 жыл бұрын
This video is super useful! I've been diving into using Automator to organize some files and one thing I've been searching for is: can I use Automator to search for folders within a hard drive but not those folders' content? i.e. can I tell Automator to search only "one level down" into a hard drive?
@santospoland3 жыл бұрын
I get the gist of the conditional zsh script. I dabble enough in the shell to sort of get it and I found it great that you covered this level of detail on this episode. Can you recommend a book, a course, a site or otherwise to get a handle on building shell scripts? Where would be a good place to start? Thanks Gary.
@macmost3 жыл бұрын
It really depends on your past experience with coding. Look for a book titled Wicked Cool Shell Scripts by Dave Taylor and see if that would be a good fit for you.
@user-wo3kg5lf9s3 ай бұрын
tried everything but its just not performing the actions. I followed the setup step by step. Im on a brand new m3. Any advice?
@macmost3 ай бұрын
You'll need to carefully check everything to make sure you didn't miss something. Or, maybe use a newer technique since this video is old: kzfaq.info/get/bejne/mcVmhZBz0p6ug58.html
@jimalix62702 жыл бұрын
Thanks so much for all your videos! VERY helpful. Gary, I'm trying to learn how to write shell scripts etc to do what you do in some of your videos, but I'm having trouble finding a reliable source. Any suggestions?
@macmost2 жыл бұрын
Just take your time and learn little-by-little. I don't know of a single source, just search for what you need.
@humbertoblanco68514 ай бұрын
Is it possible to put more than one requirement from the same file name to be moved to a particular folder. for example, lets say i have a Daily reports folder but within that folder I have subfolders organized by month. would it be possible to make a folder action move the file if it says both "DailyReports" and "July" in the file name?
@macmost4 ай бұрын
Yes, you can add that complexity if you put more work in.
@jasdeepsingh65682 жыл бұрын
Very useful
@tonybickerdike54702 жыл бұрын
Hi Gary, this script is great and learning more and more what macOS can do. I was wondering if you could teach us how to, say, take a file name, create folder from that file name, and then move that file into the newly named folder. In my scenario, I'd move about 100+ files at a time. Many thanks...
@macmost2 жыл бұрын
You could probably do that, but it would take some work to create the script. How hard that would be would depend on your programming experience. I'm not planning on doing a tutorial on something that does that specifically. If I knew what the actual problem was that you were trying to solve, maybe I could suggest something better than creating folders. Why do you need to do that at all?
@tonybickerdike54702 жыл бұрын
@@macmost I'm creating folders with essential 2-3 files inside each (...think of parent with children parts). The organization I am doing this for uses this method to sequentially organize part information. The parent file and folder are the same name. I've learned to use terminal commands to create multiple folders from a text file so when I saw your script example with "mv $f" the wheels starting turning to maybe use a "mkdir" inside the script "then" move (mv) the file. Getting the folder named to the parent and then adding the parent file into the parent folder would take a huge chunk of the (sorting) work leaving only adding the children (part) files moves to the parent folder later. Currently working on a list of 1800 part (files). This is probably an odd scenario and doesn't come up often. Also, thanks for replying.
@macmost2 жыл бұрын
@@tonybickerdike5470 Using shell scripts would be a good way to do it. What I was really asking was WHY? Why create "
@tims.28323 жыл бұрын
Very usefull, thx.
@Gravydog3162 жыл бұрын
can someone help me with Automator? I keep getting errors, & nobody on forums can help me. :(
@Karthickrajadurairaj Жыл бұрын
Can I use this for my linux shell script
@zakarileblanc51737 ай бұрын
Hi Gary, thanks for the insight. I've carefully written and re-written my shell just as yours. I changed only the search term for checking the file name. I dragged the destination folder directly in, as well. I see that the script runs as files enter the folder, but nothing seems to happen. I'm running High Sierra on an older laptop. Any thoughts on the trouble here?
@macmost7 ай бұрын
Hard for me to tell from afar, sorry.
@user-wo3kg5lf9s3 ай бұрын
Did you find a solution? Im having same issue
@veskovesilev20192 жыл бұрын
Is there a way to trigger folder actions for SD cards when they are inserted? I've tried numerous times and it doesn't seem like there is a way to trigger it. Right now i created an application with Automator and I drop the SD card icon on the app icon after it shows up on the desktop. Has anybody tried this?
@macmost2 жыл бұрын
No, there is no way to trigger folder actions. Not sure what you are doing, but triggering it with drag and drop is a good idea.
@SYPCWAK3 жыл бұрын
Thanks
@TheSquiggleySpooch2 жыл бұрын
I don't seem to have the option of selecting a shell script. I'm trying to automate moving hundreds of files that groups start with numbers 001 002 003 and so on ... those files into folders with the respective number.
@macmost2 жыл бұрын
Not sure why you aren't seeing the Shell script option. Are you using a much older version of macOS? Have you searched when "All" is selected?
@TheSquiggleySpooch2 жыл бұрын
@@macmost I seemed to have found it now! thank you :)
@fredrik_soder2 жыл бұрын
Great video! Is it possible to organise folders depending on what web adress they are downloaded from? I want all files downloaded from webside X to be organised in this folder and I want all files downloaded from website Y to another folder. Is that possible with Automator?
@ninjagames76863 жыл бұрын
i had created a password protected disk image sir the file could be delete by others so i locked the file through terminal and now i cant add any files to it nor i know how to unlock it plz help sir!
@y2ksw13 жыл бұрын
You will have to use a brute force utility for unlocking password protected files. There is no simple solution to forgotten passwords.
@ulfleisner2322 жыл бұрын
Thx for the great video. Do you happen to know wether with Big Sur something has change concerning the shell command?
@macmost2 жыл бұрын
What sort of change?
@ulfleisner2322 жыл бұрын
@@macmost i copied the script 1:1 with on my imac with big sur und cannot reproduce the result. So i was wondering wether with the new osx new shell commands etc. (that i have no idea of) might have been implimented. Thx
@macmost2 жыл бұрын
@@ulfleisner232 Did you try some of the suggestions from others in the comments? (not here, at my site)
@PaLammy2 жыл бұрын
Thanks for the informative automator lessons... Have a lot of photos on an external HDD from the last 10 years. Not catalogued... I want to catalogue them in folders by year and in them by month.... Can't manage to move the photos with their original name in an automator sorting command into a new folder that moves the photos by year/month into that new directory/folder. Is that actually possible with automator or is that asking too much?... thx
@macmost2 жыл бұрын
I probably could be done, but it would be a lot easier to do it by hand. Just sort the folder with the photos by date, then select a range of photos, then File, New Folder With Selection (or use the keyboard shortcut shown) and repeat. It will take some time, but likely not as long as it will take to figure out the Automator script.
@PaLammy2 жыл бұрын
@@macmost Thanks for your quick response, still bad weather here in the Netherlands so started sorting right away.... Have a nice day
@ahapiotr3 жыл бұрын
Hi, is it works with folders with content? I need to create archive of graphic materials sort by numbers (names of folders) - for example: A10000/A10100/A10121/ working as a hotfolder.
@grahamcohen38503 жыл бұрын
This is just what I was looking for to keep my downloads folder organized. I have just one issue. Is there a way for this to ignore case in the file name? An example is I have my script to look for .mov files and move them to a Movies folder. The issue is it doesn't move files that are tagged . MOV. Do it just have to double up on every entry to include upper case extensions or is there a way to have the script ignore the file case?
@macmost3 жыл бұрын
You'd have to look at the man (manual) page for mv and see if there is a way. It would be the mv command that would need to understand that this is case insensitive. Might be easier to just have two lines, one for each though.
@DanielCasasOfficial2 жыл бұрын
I had it! I was using automator and generally got what I wanted accomplished with folder sorting through using actions like you do at the beginning. Then I tried to do a bit of customization with the folder names and locations and it stopped working, which I half expected. So I went to build the automations again and now I can not get it to work to save my life. I keep getting an error that reads: "The action “XYZ” was not supplied with the required data." and I get it for every action.
@macmost2 жыл бұрын
Just a matter of checking your code and finding the bug. Start from scratch again if you like.
@DanielCasasOfficial2 жыл бұрын
@@macmost So I eventually figured it out, I had to right click in folder actions setup and attach it to the folder manually for some reason. Still can't get the full architecture of what I want correct though. I just ended up dishing out for Hazel to get the job done.
@zarintasnimpromi26723 жыл бұрын
for me its not working somehow. can I choose the same folder location for various file types with the elif statement?
@macmost3 жыл бұрын
Start with my exact example and get that working. Then modify to fit your needs.
@NoName-sc8xr2 жыл бұрын
Hello everyone) Can someone help me? I was trying to sort files by name at the folder. And yes, it not hard with letters. But how can I sort files by the presence of certain numbers in them?
@TM-vg4mx3 жыл бұрын
thanks for the great videos, would be possible to use automator to combine scanned file (I know it is possible to combine odd and even pages) but there is no way to reverse the even pages before combining? (it can be done via print as, page handling but not via automator?) thanks again for these great videos.
@macmost3 жыл бұрын
Reverse? Not sure what you mean by that.
@TM-vg4mx3 жыл бұрын
macmostvideo most of the scanners scan one side of the page at the time. So for odd pages you get them in order 1,3,5 ... but then you flip the pages you get the last page first say ... 6,4,2. So to combine them we need to reverse the order to 2,4,6, ... before combining them into one using Automator. It is easy to combine pages in Automator but cannot find a way to reverse the even pages first (will need to do manually via print-page handling first) thank you
@macmost3 жыл бұрын
@@TM-vg4mx Oh, reverse the ORDER of the pages. You may be able to do it with Automator, but it will take a lot of experimentation and work. Perhaps easier to do it in Preview yourself, manually, depending on how much of this you need to do.
@kevinfrye3680 Жыл бұрын
Please help: I have tried all of this and part of this. I have a Macbook with the M1 chip if that matters. May I send my code to you?
@macmost Жыл бұрын
Did you copy and paste my code? Did you then change the paths to match your paths?
@prodigaldoctor4 ай бұрын
I have tried both of your methods 1. First method worked fine 2. But in the 2nd one which uses script it copies and move that file to destination folder I tried it on download folder so what it does it it copies the file and move the file to destination folder but this creates a copy one of which remains in the download folder itself. Please help me with this
@macmost4 ай бұрын
Are these two location perhaps on different drives?
@prodigaldoctor4 ай бұрын
@macmost i am trying it on default download folder to a folder made on desktop
@macmost4 ай бұрын
@@prodigaldoctor Not sure what the problem could be. Maybe experiment other folders to figure out what could be going on.
@prodigaldoctor4 ай бұрын
@macmost ok I will give try & thanks for the help 😇
@justkailash3 жыл бұрын
cant we do this multiple file types move to the destination without coding.. just with drag and drop actions in automator?
@justkailash3 жыл бұрын
@Mindful Chase yeah i tried it .. it is working with automator just want to make few more nested jobs.. like different type of file to the different folder
@toddlichtenwalter2041 Жыл бұрын
Hi Gary, I followed this example but for a folder action where the filelnames are all changed to common name and sequential. The problem I am getting is that the folder action sequence is running on loop and won't stop. I created an app instead that accomplishes the desired tasks but it would be better to have the folder automation. Any tips to help me figure out what is wrong with my folder action: here at the 2 steps I have for the Folder Action- 1) Find Finder name (Search is pointed to my folder called Batch Rename) 2) Rename Finder Items: Make Sequential (new name: cat; Place After, Start at 1; separated by space).....what happens is that when I drop any new files into the folder the workflow action starts but just loops and never stops until I manually kill it.
@macmost Жыл бұрын
Do you mean it continues to add something to the filename over and over? I suppose for something like that you'd need to check to see if the filename already fits your naming desires and only change it if you doesn't.
@heydeleao3 жыл бұрын
Gary, can you help me? I need to copy a folder to multiple folders at the same time. I don't know how to make this. :-(
@macmost3 жыл бұрын
I'll need more info about what you are trying to do. Ask at macmost.com/ask and be sure to fill out each part of the form.
@heydeleao3 жыл бұрын
@@macmost I've just answered!. Thanks!
@ripvanwinkle27412 жыл бұрын
@@heydeleao care to share?
@jebl88883 жыл бұрын
Can anyone just explain the DEST=" " or !=" " (that is to say, why would you set the destination to blank?)
@macmost3 жыл бұрын
The script starts by setting it to blank. Then it does three tests to set it to something specific. If none of those three tests fits the situation, DEST is still blank. Then, before proceeding to the next part, it checks to see if DEST is not blank and only moves the file if it is not blank -- in other words if one of the three situations matches.
@unleashthedog2 ай бұрын
Does Automator still works in 2024? And how can I share a script/automation with my team? I created a shortcut to create projects folder but I can’t share with my team because it needs iCloud logins - which we don’t have.
@macmost2 ай бұрын
Sure it does. But Shortcuts is the future, so best to use that if possible. Not sure what you are doing to "share" an Automator workflow. It is just a file. Share it like any other file.
@unleashthedog2 ай бұрын
@@macmost that’s what I mean, it can be easily downloaded, whilst shortcuts needing iCloud, makes it impossible, because our work computers are not logged in iCloud. We are getting new ones sometimes soon but I don’t imagine that will change
@macmost2 ай бұрын
@@unleashthedog You can save a Shortcut and share it as a file just like you can save an Automator workflow. File, Export. Saves as a .shortcut file.
@macmost2 ай бұрын
You can also save it online with iCloud. The recipients don't need to have iCloud. You an just give them a link.
@Deankut3 жыл бұрын
Is there a way to RENAME & MOVE Finder Files in one script so all you have to do is drop a file into a folder and it does both?
@macmost3 жыл бұрын
Yes, you can do both. The tricky part would be figuring out what to name the file -- some logic would need to be applied depending on your needs. The mv command actually does both a move and rename as long as you supply a new name at the end of the second path.
@Deankut3 жыл бұрын
@@macmost Aaahhhh, thanks, Gary! That was what I was missing. Much appreciated!
@IceOnDaMix2 жыл бұрын
here again in 2022... still not working for me...bash is annoying sometimes
@LunadelMarMusic Жыл бұрын
Can we do this with .mp3?
@macmost Жыл бұрын
The general idea should work with any file.
@Ralfissimo_Old2 жыл бұрын
First of all: Thanks for that brilliant tutorial, I never knew what to do with Automator Scripts but your example made me getting some ideas. What if I need an IF with two parts? I. e. All files containing both "Mac" and "Most", like "Mac123Most"? if [[ $f == *"Mac"* ]] and [[ $f == *"Most"* ]] does not work, if [[ $f == *"Mac"*"Most"* ]] does not work either. Special Wish: I want to move these files, but also renaming them to the name "Mac Most yyyymm" (Spaces are important) with yyyy = current year and mm = current month... I'd be glad if you could help me....
@growtlab52603 жыл бұрын
Can we create app and sell it to others?
@macmost3 жыл бұрын
Probably not. Apps are usually developed in Xcode or similar tools with complete user interfaces and then sold in the App Stores. Something as simple as a shell script is usually just shared freely online.
@samialharbi12653 жыл бұрын
Hello, I have a question off topic. I just replaced my mid 2014 MacBook Pro battery, should I “calibrate” the battery as everyone recommend it?! Thanks
@y2ksw13 жыл бұрын
If you want a good estimate on how long the battery may last, calibration is the way. On the other hand, the Mac software learns it by itself, if you allow to discharge and charge it fully for a few times ... while using it, as you normally would.
@macmost3 жыл бұрын
Just use it normally. No need to calibrate.
@Assassin19593 жыл бұрын
Is Automator is a program?
@Assassin19593 жыл бұрын
Never mind found it....
@PRECIADOR3 жыл бұрын
THE SCRIPTS LOOK & SOUND SUPER COMPLICATED 😭
@AlergicToSnow3 жыл бұрын
RAMÓN PRECIADO you need a basic understanding of programming. A better way is to get an app called Hazel. It’s awesome.
@jebl88883 жыл бұрын
I think you can find load os Apple Scripts online and on Gary's site, so I don't really think buying Hazel is necessary. I found Hazel complicated in comparison to Automater, but that's just me.
@Assassin19593 жыл бұрын
Ok you lost me as soon as I started the video...:-)
@moshesiani63632 жыл бұрын
What if i want to use the $f inside osascript? I want to send a command in Terminal using the data from [for f in "$@"] (url) with Terminal window open. The problem is to open Terminal window you need to use osascript and when you try to run a command using $f data it just echo $f and not the url. This is my script to download video using yt-dlp but i want to see the progress inside Terminal window and i don't know how to do it: for f in "$@" do cd downloads /usr/local/bin/yt-dlp --restrict-filenames --ffmpeg-location /usr/local/bin/ffmpeg -S "ext" $f osascript
@holelabsllc6683 жыл бұрын
I tried using the brute force bur logical method you mention: set a variable to use on multiple filters in one workflow . It fails because the move to folder gets no input. Have you got secret sauce?