Murphy Mac - Screencasts and Tutorials » Posts in 'Utilities' category

Deleting Duplicate Files with Tidy Up

Recently a civilian asked Murphy about finding duplicate files on their computer.  Folder names had been mangled and made no sense.  Files had been duplicated over and over again, many of them with different names.  It was a mess.

I remembered writing up a Mac app a long time ago and dug deep into the Murphy Mac archives, where I found Tidy Up.  As soon as I watched the screencast I remembered being impressed with the results of the app, and its power, despite not truly having a need for it.  Because Murphy files everything just so.

Anyway, I decided to take a look at some tools for finding duplicates and asked the developer for an updated version, which I received.

One thing that really impresses me about Tidy Up is the safety features designed to prevent deletion of the last copy of a file.   For example, if a search finds six copies of foo.jpg there’s an option to display all but one copy.  Then you can delete the five duplicates from within the Tidy Up interface.

Let’s run through an example and look at one way Tidy Up might help you achieve your goal.   Let’s say you have two folders that both have files.  Some of the files have duplicates with different names.  Sometimes the dupe is in the same folder with the original, sometimes it’s in the other folder.  And sometimes the dupe has the same name but it’s in a different folder.

Take a look at the screenshot showing our example files.

files

Click image for larger version

The files are in two folders, named here and there.   My goal is to end up with one file for each airport code.   Also, notice there are three files containing the code mia.   Additionally, I’d prefer to end up with the files that don’t have the word “copy” in their name.  Think of it this way:  Maybe you have a bunch of files and you named some of them with a convention like winter2011 001.jpg, winter2011 002.jpg and so forth.  But you have duplicates of those files with names like DSC001.jpg and DSC002.jpg.    You might prefer to have the DSC files eliminated as the duplicates instead of the winter ones.

The first step with Tidy Up is to add the two folders we want to search for duplicates.  In our case, the folders named here and there.   In the screen shot below the folders are shown in Tidy Up after we simply dragged them in from Finder.

The two folders we want to search for duplicates

 

Once we run the search Tidy Up presents us with a list of files that have duplicates.  There are a number of containers we can choose from to limit which files are displayed, but the default is to show all copies of any file that has a duplicate.   Files without duplicates in here and there are not displayed.  Screen shot below.  Notice that the mia file has three copies, and two of them have the same name.

The full list of duplicates. Each file is color coded red or yellow to indicate its folder location.

 

Remember, we wanted to preserve files that didn’t have the word copy in the name if possible.  To do this, we’re creating what Tidy Up calls a Smart Basket to identify all the files with the word “copy” in their name.  Then we’ll use Tidy Up’s label feature to mark these files with the blue label.

Take a look at the next screenshot.  Notice the container selected is called “has copy in name”.   That’s our smart basket.  We’ve selected all the items in the basket and applied a blue label to them.

A blue label has been applied to every duplicate file with the word “copy” in it.

 

We could have just deleted all those files there, but instead we’ll go back to the container called All Items Found and verify that our labels were applied as we expected.  In that container we’ll also sort by label, so all the blue label items are listed first and are easy to select.

The search results have been sorted by label, resulting in all the files with “copy” in the name listed first.  Notice that cdg doesn’t have a file without the word “copy” in it.

 

One of the great things about about Tidy Up is that it tries to prevent you from accidently deleting the last copy of a file.  In other words, when you’ve performed a search and selected files to delete you may have selected all copies of a particular file, as is the case in the previous screenshot with regard to cdg.   When we use the delete tool within Tidy Up we’ll get notified that one file was not deleted because it was the last copy.  See below.

Tidy Up warns when you’re about to delete the last copy of any of your search results. That’s good.

 

If we look at our search results now there are only two files left.  Remember, we told it to only delete selected files, and we only selected files with “copy” in the name.  So our mia duplicates still exist.  We could continue on and delete any remaining duplicates from here. Let’s take a look at the Finder to see what we’re left with after running our delete job.   Notice below there’s one file left with the word “copy” in it, but that’s because we only had files for cdg with the word copy in them.   Notice as well that we have two copies of mia.  That’s because we didn’t bring the full power of Tidy Up to bear yet.  More on that after the screenshot.

Our situation has improved. There is still one duplicate to be dealt with. And one file is left with the word “copy” in it. But both of those things were to be expected.

 

There’s one other feature of Tidy Up I should mention.  Even if you only search one folder there’s a very powerful feature.  Tidy Up has the ability to show all but one file for each set of duplicates it finds.  In the two screenshots below there’s a file in the search results that has nine copies.   When we select All Items Found we see all nine.   But when we select All But One Item of Each Duplicate Group we only see eight.  The ninth is being hidden from view so we can safely delete the eight and still have a copy left.

All duplicates displayed

 

Only eight files are displayed. The last copy of the duplicate set is automatically not shown so we don’t delete it.

 

There’s a lot more to Tidy Up.  It has special features for iTunes and iPhoto.  It has all kinds of options for dealing with very granular file details and customizing your search extensively.  There’s no shortage of tools for this task, but Tidy Up makes it very straightforward.   The interface is clean and makes it easy to see where your duplicates reside.

Here’s another Murphy Mac post about Tidy Up, including a screencast.

Tidy Up is available for $30   There’s also a thorough user manual (pdf).

 

 

 

 

 

 

| Permalink

If This Than That For AppleScript Kickoff

For a long time I’ve used scripts that were kicked off by incoming mail on my Mac.  As long as the mail was from me and the subject matched a keyword the script would run.  There are plenty of tools enabling remote control of your Mac.  But for some things I still find it easier to kick off a script than to manually take control of the Mac.  SSH takes longer, and so do remote desktop apps.

There were some problems with the Mail.app scripts.  Sometimes Mail wasn’t running.  Sometimes they didn’t kick off for some unknown reason.  When things don’t work every time you tend to stop relying on them.

I’ve got a new way to kick off scripts by sending a text message to If This Than That.   IFTTT receives my message and writes a text file to my Dropbox account named after the message content.   My Mac sees the file and a Folder Action script runs, performing whatever task I requested.

There are a couple I use frequently:

  • Mute my Mac
  • Launch iTunes
  • Reboot my Mac
  • Kill and restart EyeTV
  • Turn on Require Password in System Preferences

I’ve assigned a one letter code to each of those things.  When I send the letter in a text to IFTTT I’m done.  My Mac goes silent or iTunes launches for my Apple TV or whatever it is I need happens.  Less steps than SSH or some kind of remote desktop.

My mind is starting to go so it’s hard to remember which letter does what.  Every once in a while I text #m to IFTTT and they text me back a canned text message I prepared with the key to my commands.  Their reply to #m looks something like this:

a. mute b. iTunes c. restart EyeTV

The thing I don’t like about this method is giving IFTTT access to my Dropbox account. Not that I have an issue with them specifically. I’m just hoping that the protocols to allow interaction between various online services become more granular so you don’t have to grant so much access for whatever you want to do.

I’ll post some more information over the next few days detailing the AppleScripts themselves.

 

| Permalink

Extended Apple Wifi Networks

Murphy has been keeping an eye on threads in Apple Discussions about firmware updates to Airport base stations. Problems with the 7.6.3 update aren’t universal. It seems the people who are having trouble are using more than one Apple router.

The issues are somewhat varied. Some report basic connectivity problems and many report a significant slowdown on their network.

But the main reason I’m posting is to point out a couple of Apple Support documents I’d never seen before, referenced by Vijay S on the Apple Discussions support site. The articles address setting up a roaming network. Roaming means you have multiple base stations, and your devices automatically connect to whichever one has the best signal without your intervention. Vijay points out that setting up a roaming network might not be as intuitive as you’d expect. I’d have to say I agree.

When I extended my wireless network I referenced a book I reviewed a long time ago, Taking Control of Your 802.1n Network by the incomparable Glenn Fleishman. If you’re interested in fine-tuning your Apple-based network you should grab this book. The latest edition includes updates covering changes to the Airport Utility and Mountain Lion.

The two Apple documents referenced by Vijay are :
Extending the range of your wireless network by adding additional Wi-Fi base stations
and
Setting up and Configuring a roaming network (802.11 a/b/g/n)

One point that gets some emphasis: If you can use Ethernet cable to extend your network you should. When we had our kitchen renovated last year I finally got an Ethernet cable running to the back of the house. My main Airport Extreme base station was upstairs toward the front of the house. Now I have coverage in the back of the house as well via an Airport Express wired into my network.

The key thing I learned when reading the Glenn Fleishman book was making sure your wireless networks have the same ssid name, password, and security settings. The only exception in my case is that I’m running both 5 and 2.4ghz networks. The 5ghz networks have different names than the 2.4 ghz networks because you probably have a reason for picking one over the other.

Some people prefer to lump their 5 and 2.4ghz networks into one name; you can read up on that in this Ars Technica article. Personally I agree with this comment so I can easily identify which band I’m connected to.

With two base stations serving up wireless networks named and secured the same way my wireless devices can roam from one base station to the other without the user noticing. It’s great.

 

 

 

 

 

 

 

| Permalink

Hide Everything

desktopEver want to hide ALL your applications and start with a clear, swept off desktop on your Mac? Yeah, there’s Exposé, but that’s not the same as what we’ll see here. When you show your desktop via Exposé you’re not changing the state of your applications to hidden – so as soon as you switch to an application the others will all be visible too.
If you’ve used Windows you may have used the Show Desktop icon in the taskbar to minimize all windows. We’re not going to minimize, we’re going to hide. But the end effect is the same. You’re looking at your desktop with nothing in your way.
How do we do this? A very short and simple Applescript. With one small concession.
If you’ve ever tried to hide ALL your applications you probably know what our obstacle is.

Try this: Switch to Finder and hit Command-Option-H. That hides all applications except Finder. Once they're hidden try hitting Command-H to hide the Finder itself. It doesn't work.

So here’s a workaround that’s acceptable to me: Our Applescript will hide the windows of all applications except the Finder. Then it will CLOSE all the Finder windows. The end result is a clean desktop with application windows that stay out of sight until you summon them back into view.
Optionally, you could include the 3 lines of the script after the line “Close every window” (commented out with dashes in the image below) to open up a single Finder window to a specified folder and use that as your starting point.

script

Once you’ve created the script you need a way to kick it off. I use TextExpander for a lot of these things. TexExpander is a fantastic text replacement utility that can also run Applescripts when you type certain characters. For example, Murphy might type dsktp or ddesk to make TextExpander run our script and display the clean desktop. There’s a lot more to TextExpander than running Applescripts, but I find it very handy in that capacity. Instead of memorizing somewhat arbitrary key combinations you can make up a code – so your shortcuts are more like keywords with meaning than shortcuts that generally only carry one letter. Murphy covered TexExpander here.
As an alternate check out FastScripts from Red Sweater Software. FastScripts lets you assign a script to a keyboard shortcut. And it has powerful features for helping you manage your script library. If you’re a heavy Applescripter you probably already know about it. If not, take a look at the features.

| Permalink

CDFinder – Catalog Your Drives and Disks

drivesDon’t let the name fool you, CDFinder isn’t just for CDs. It can catalog your thumb drives, external drives, internal drives – and DVDs too.  This allows you to view the content of your media without powering up the drive or bringing it online.

Drives have started piling up around here. There’s a Drobo that helps a little, but I can think of four loose 3.5″ drives that have stuff on them. And a couple of portable USB drives. And piles of CDs and DVDs.

There’s also an offline G5 that I want to retire. I forget what’s on there from time to time so I use CDFinder ($39.99US) on my Macbook to take a look. CDFinder catalogs the contents of all kinds of files allowing you to view them when their host drive or disk is offline. Images, video, text, Adobe pro stuff – it can even index EyeTV files.

CDFinder is a big help with images. The application can generate thumbnails to help you sift through your content. Geotagging features let you add location data to your images and view them on various mapping services. Commercial CDFinder customers use it for managing large libraries of various types.

CDFinder developer Norbert Doerner stays busy adding new file types and features to the application. It can generate thumbnail images for many file types, including video formats.

You can assign labels to files and other custom fields. If the drive is online you can select a file and press the spacebar for a Finder-like preview.

I don’t have Spotlight indexing my Drobo, but I’ve got a CDFinder index so I can quickly search for files. cdfinder

I have little faith in the longevity of optical media, so I don’t have tons of CDs and DVDs to index. But I’ve got a few too many drives lying around. CDFinder can be a great help in getting your data organized –  and spotting what needs to be backed up.

I may not be the primary target audience of this product, but I can see where it could be useful and convenient for people with growing libraries of digital media or file archives at home. One thing I’d really like: The ability to tag files for removal and have them deleted when the drive is online again.

There are other products that perform similar functions. The CDFinder website has posted comparisons to other products – providing information on how they stack up.  Clearly CDFinder is a mature product with sophisticated features, like the ability to import catalogs from other indexing products.

The trial version lets you index 25 media items, that’s plenty to let you know how the product works. Keep in mind that CDFinder isn’t shareware, Norbert requires payment if you’re going to use it, even if you’re under 25 indexed items. Different licenses are available, including “Joe Average User.”

I started a small screencast for this post and it crashed on me. But Norbert at CDFinder has you covered with this walk-through video.

Screencast | Permalink