![]() Print window = Cmd + Shift + 4 and then press Spacebarĭelete file from Finder = Cmd + Backspace Partial print screen = Cmd + Shift + 4 (You get a cursor to select what to capture) So here’s a list of keys that I think are useful to know:Ĭlosed curly bracket (}) = Shift + Alt + 9 A quick Google doesn’t really help as it seems to be different on my Finnish keyboard. So instead, I think I’ll just use this space to write down stuff so I don’t forget.įor example, I can never remember how to type pipes or square brackets on my MacBook Air. ![]() I think and plan too much about what to write and then never get around to it. Wow, it’s been two and a half years since my last post. Delete_RAW.sh /Volumes/Photos/Archive/2015 If the script was named Delete_RAW.sh then you use it like so: $. Xmpfile=$(echo $fixentry | sed 's/.$/xmp/g') Rawfiles=$(find "$1" -name "*.CR2" -o -name "*.ORF" | sed 's/ /\\-/g' |sed 's/CR2\\-/CR2 /g' |sed 's/ORF\\-/ORF /g')Įcho Only deleting RAW files with equivalent DNG files.ĭngfile=$(echo $fixentry | sed 's/.$/dng/g') To do that I’ve written the follow shell script: #!/bin/bash And when you delete all the RAW files, you might want to make sure that the converted DNG files exist. Perhaps view them all or import them to Lightroom. If you want to be really sure then it’s probably a good idea to first check that the DNG files are good before you delete all those RAW files. $ find Photos/Archive/2015 -name "*.CR?" -type f -delete $ find Photos/Archive/2015 -name "*.CR?" -type f | wc -l For example: $ find Photos/Archive/2015 -name "*.dng" -type f | wc -l To be safe though, you might first want to make sure that you have the same number of DNG files before deleting all the RAW files. The above command will recursively go through all the subfolders and files under the defined path and delete all files with the defined file extension. One way to do this manually is by opening a terminal session on your Mac and entering this command: $ find -name "*." -type f -delete However, this option is unfortunately missing in the DNG Converter. In Lightroom, you have the option to have your old RAW files deleted automatically after conversion. This can be done from within Lightroom or with Adobe’s free DNG Converter. Recently, I decided to convert all my old RAW files to DNG. Fix_DNG_date.sh /Volumes/Photos/Archive/2015 ![]() To run the script, you simply give the path to check. Let’s say we call the script Fix_DNG_date.sh. Output=$(/Applications/Affinity\ Photo.app/Contents/Resources/exiftool -createdate "$fixentry" | grep Create | sed s/://g | sed s/\ //g | sed 's/^CreateDate//' | sed 's/.$//') So I’ve made a script to do it automatically for all DNG files found under a defined path: #!/bin/bashĭngfiles=$(find "$1" -name "*.dng" | sed 's/ /\\-/g' | sed 's/dng\\-/dng /g')įixentry=$(echo $entry | sed 's/\\-/ /g') But this isn’t easy to do manually for lots and lots of newly converted DNG files. Okay, now we can check the date the photo was taken and update the creation date of the file. Once you have ExifTool, you can check the date the photo was taken by executing: $ exiftool -createdate In fact, I didn’t have to install this tool because it’s already bundled with Affinity Photo. This tool is so awesome that it’s even used by various commercial applications. This is fine except how do you know when a photo was taken? You could go to Lightroom (or some other application) to check but I prefer a command line interface. As it turns out, you can easily change the creation date of a file by simply executing the following terminal command (Mac/Linux): $ touch -t I would prefer if the creation date was the same date as when the photos were taken. A “problem” I noticed when converting my RAW files to DNG is that the file creation date of the DNG files is the date the conversion was done.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |