macOS

Merge two folders

HELP!
I need to merge the content of several large folders on my mac.
Filemanagement with Windows and Mac OS X differs, when it comes to folder replacement.
Under Windows if you have two folders with the same name, the windows explorer will warn you, that files within that folder will be replaced with the ones you just dragged in. As the result, you will have a folder containing all the files form you source-folder accompanied by the ones in your target-folder, that were not present in the source-folder.

WATCH OUT!
Under OS X, if you drag a source-folder on a folder containing an equally named target-folder, you will replace your target-folder with the source-folder. Data that was not present in the source-folder will be lost! Merging data is not trivial under OS X.
The Kingsize-Solution to leave newer Data untouched is the rsync comand. This is the way you want to choose, if you are unsure, if you updated files within both folders.

Example
We have a TEST Folder within the Source Folder, we want to merge with the TEST Folder inside DROPIN. We use the folowing comand from within the terminal.

rsync -au SOURCE/ DROPIN

-a stands for the archive option; -u leaves newer files in the destination folder untouched.

For those of you who want to save some typing and use drag an drop:

rsync -au "dragged sourcefolder icon" "dragged targetfolder icon with the last forwardslash removed"

Another option is the ditto comand, which copies the files and adds the ones that were not present before as well as overwrites the ones that were present in both folders.

ditto SOURCE DROPIN

See the internet for the many more options these comands have or use the option -h. Especially rsync has options to configure what exact files you want replaced, like timestamp, filesize or type.

Of course you should try this out for yourself, to prevent unwanted data loss!

GO SANE

Today I’m going to introduce a way how to connect a image capture device, which is not natively supported by OS X, to your mac.

The Problem: I wanted to connect a rather old scanner – a HP Scanjet 3300C to my Macbook Pro. However HP doesnot deliver any current drivers to connect it to my mac.

The solution is an open source interface called sane which delivers connectivity to many many image capturing devices and also enables Linux to capture images from your digital camera or scanner. Basically the sane interface sits between your operating system and your connected hardware as a driver. The sane frontend connects sane and your operating system. The backend connects between sane and your hardware. This is a very convenient solution to save development time and money as you only have to establish a connection to sane once.

In my case I needed the appropriate files for OS X and installed 1. the libusb package followed by 2. the sane-backends package. And finally 3. I installed the TWAIN-SANE-Interface.
There is also an option, to install a preference pane in your system configuration, where you can select your image capturing device and do more configuration tasks.
There is also a a backend available for the HP 3300c, but for me the above steps were sufficient.

In Photoshop you will find a new device under the import section called sane. The features you will find here can not compare to the Windows 98 Driver, however you can select the disired resolution and use your hardware. Otherwise I would have needed to invest in a new scanner, which I did not want to.

There is a wide variety of image devices available. Maybe yours is among them.

Go Sane and have a nice scan!