How to create a folder, then copy files into it from a SD card?

I am in the process of scanning in what seems to be about 10,000 slides. My dad shot a lot of slides apparently. I have a shelving unit full of them. Thankfully, we was decent about labelling the boxes. Aside: I am using a Kodak Scanza which only saves to SD card.

My current plan is to take a box, scan it, and then copy it to my Mac in a folder named after the box. For instance, a box labeled “Family Vacation 1990” would get scanned, and then copied to a folder in \SlideScan\Family Vacation 1990". I would then delete the files off the SD card and start the next box. It’s about the only way to keep my sanity and remember what I am scanning.

I have a Keyboard Maestro Macro (screenshot below) that detects the SlideScan SD Card, creates a new folder at a variable path. I am then trying to use a shell script to copy the files, which is where is fails with a folder not found error. I think I am handing the variable off incorrectly.

What is the best way to do this? Ideally I’d like KM to handle the folder creation, copy, and deletion.

1 Like

Keyboard Maestro seems like a good approach to me.

Try removing the square brackets around your variable in the script step.

Ref. https://wiki.keyboardmaestro.com/action/Execute_a_Shell_Script

You could also echo out your variable values / command to a log file so you can see what the script is receiving/ interpreting and attempting.

That worked. And fixing the typo in the shell script.