Monday, June 3, 2013

Mac Finder + command line fu = Windows XP Explorer

I have an image processing application that supports drag and drop.

I wanted to drag all the .jpg files onto the image processing application.

The problem is that the files are located in a lot of subdirectories.

Actually, the real problem is the Mac Finder, which blows bits.

One of these days, I'm going to write a Finder that behaves like the Windows XP File Explorer.

In the meantime, I get to use some Bash and command line fu to get the job done.

$ cd /directory-to-place-all-links

$ find /root-image-directory . -name '*.jpg' -type f -exec ln -s {}  . \;

Now, I can drag all the files (links) to the image processing application window.