Applescript to automate the laboreous matching and moving jpg/CR2 files

Hi
I used to use MS Basic (at school) and was (really) good at Hypertalk but have done no scripting for years (since they killed Hypercard)
I am a photographer (as a hobby) and will take 1000-2000 photos on a weekend. I shoot JPG & CR2. The JPG are much quicker to evaluate and that's why I use them. I will normally keep about 5%. At present I end up manually picking out the CR2 files which match the JPGs I've sorted. This takes up to an hour of horrible, tedious, eye-straining work. I've searched for scripts which would automate this but haven't found one that works ...
I would like a script which would, for instance, get the names of all the JPG files in one folder and find the  (CR2) matches in a second folder and move those (CR2) files to ether a third folder or the folder with the original JPG files are ...
I'm not totally useless at following scripts but also don't know enough Applescript to find out how to make the scripts I've seen which purport to do the job described work ...

This is actually pretty straightforward to do. The following script and its comments should give you an idea.
-- first prompt the user for two folders:
-- 1: the folder of JPEGs to keep
-- 2: the folder of matching CR2 files
set JPEGFolder to (choose folder with prompt "Select the folder of JPEGs to keep:")
set CR2Folder to (choose folder with prompt "Select the folder containing the .CR2 files:")
-- now work your magic
tell application "Finder"
  -- iterate through the JPEGs
  -- the 'whose name extension...' is optional, but will help filter out erroneous files
  repeat with eachFile in (every file of JPEGFolder whose name extension is "jpg") as alias list
  -- work out the base name of the file (i.e. without the '.jpg'
  set basename to (characters 1 through -5 of (get name of file eachFile)) as text
  -- now append ".CR2" to the base name, which gives us the corresponding .CR2 file
  set CR2Filename to basename & ".CR2" as text
  -- now we know the file we're looking for, so copy it
  -- we use a 'try' block to catch any errors (e.g. missing .CR2 files)
  try
  -- this is the line that does the copy
  -- note that it copies the .cr2 to the JPEG folder
  -- change the 'to' parameter to some other folder if you want
  --  the copies to go elsewhere
  duplicate file CR2Filename of CR2Folder to JPEGFolder
  end try
  end repeat
end tell

Similar Messages

  • I am trying to print a color photo on my MacBook Pro from iPhoto (not using Photoshop) using Epson 2200 printer, and everything I do in the Color Matching and Print Settings results in a photo with a pink cast to it. What am I doing wrong?

    I am trying to print a color photo on my MacBook Pro from iPhoto (not using Photoshop) using Epson 2200 printer, and everything I do in the Color Matching and Print Settings results in a photo with a pink cast to it. What am I doing wrong?

    Have you checked the ink cartridges and made sure the nozzles are clear? Are you able to print from outside of iPhoto with the correct color?
    Try the following: make temporary copy of the library and do the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • Automate the EAR creation and deployment process

    Hi,
    I am trying to automate the EAR creation and deployment process. I am following this approach - http://www.oracle.com/technetwork/articles/adf/part4-098813.html
    In this approach we use pure ANT without OJDeploy. I am able to Create the EAR file but while deploying to weblogic server manually I get the attached error.
    Error is - java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    I would like to know, Is this the best practise to automate the EAR Creation and Deployment Process? If not, Please provide me some other best approach.
    Thanks in Advance.
    Regards
    Balaji S

    Balaji,
    I am the author of that article.
    At the time I wrote the article, ojdeploy was not working properly - however, the bugs that I noted at the time have been fixed. If I were writing the article today, my strong recommendation would be to use ojdeploy.
    If you insist to use the pure ANT (no ojdeploy) approach, I'd debug your issue this way:
    1). Generate the EAR file using the deploy option from the application navigator in JDeveloper. Deploy that EAR file to your WLS server and test to ensure it works. A note that if you are creating an ADF app, you must deploy the JRF to WLS first.
    2). Once the EAR from JDev is working, use a tool such as WinZip to expand the JDeveloper-generated EAR file and your ANT-generated EAR file. Compare the two. If you find differences, fix the ANT scripts so that they are the same.
    John

  • Under the iCloud portion of settings on my iPhone, I have always gotten the message "account not verified". The email matches and is in fact the same for my accounts on iCloud and iTunes. Has anyone had this problem, and how have they resolved it?

    Under the iCloud portion of settings on my iPhone, I have always gotten the message "account not verified". The email matches and is in fact the same for my accounts on iCloud and iTunes. Has anyone had this problem, and how have they resolved it?

    Hello megalina23
    You need to verify the email address associated with the Apple ID. Check out the article below on how to do this.
    Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • How to automate the data load process using data load file & task Scheduler

    Hi,
    I am doing Automated Process to load the data in Hyperion Planning application with the help of data_Load.bat file & Task Scheduler.
    I have created Data_Load.bat file but rest of the process i am unable complete.
    So could you help me , how to automate the data load process using Data_load.bat file & task Scheduler or what are the rest of the file is require to achieve this.
    Thanks

    To follow up on your question are you using the maxl scripts for the dataload?
    If so I have seen and issue within the batch (ex: load_data.bat) that if you do not have the full maxl script path with a batch when running it through event task scheduler the task will work but the log and/ or error file will not be created. Meaning the batch claims it ran from the task scheduler although it didn't do what you needed it to.
    If you are using maxl use this as the batch
    "essmsh C:\data\DataLoad.mxl" Or you can also use the full path for the maxl either way works. The only reason I would think that the maxl may then not work is if you do not have the batch updated to call on all the maxl PATH changes or if you need to update your environment variables to correct the essmsh command to work in a command prompt.

  • I opened the hard drive and found some intrusive files under places in left side of window..  How do I take them out?

    I opened the hard drive and found some intrusive files under places in left side of window..  How do I take them out?

    Thanks for the reply. I was able to save the data on the Macbook Air whose HD got corrupted by using File Sharing (ethernet connecting two Macbook Airs).
    I am also going to make a disk image of the HD using Disk Utility and mount that Disk Image onto an external hard drive. That way I can save the hard drive contents.

  • How to export the same mb size of my cr2 files into jpg or tiff files in Lr?

    How to export the same mb size of my cr2 files into jpg or tiff files in Lr?
    Let's say my file size is 22mb, when i export the file to tiff or jpg, although Iam careful with the settings- file size, dimension, resolution, I can't manioukate how I want it.
    With jpg I tried everything, no matter what i do or change in files size or resoltion it remains the same size- 7mb as opposed to 22..
    Please advise,
    Best wishes,
    T

    I would noramlly opt for a tiff file, sending such a high res through the nest a nightmare
    This is probably just an improper use of terminology, but the resolution of a JPG, DNG and TIF should all be the same.
    The files differ in size, not resolution and not number of pixels.
    Jpg is not that bad, but its a pitty they have to be edited under a jpg format..
    Your raws are edited as raw. There is no loss of quality in the editing process. The files are then exported as JPG, which will cause a loss of quality. For just about any use, the loss of quality in the image when you export a JPG at quality level 12 is NOT noticeable. For many uses, exporting a JPG at a quality level of 8 will not be noticeable either, unless you intend to print the photo at a very large size. As twenty_one (not his real name) said, "Jpeg compression is fantastically effective".

  • How can I automate the threshold for a moving object whose light intensity changes for each frame.

    I'm using the PCI-1408 and I have this video where an object's shape and color intensity changes for each frame. I want to do a pixel count of that object verses the background (the background also changes color) for each frame. I'm guessing that I need an automatic threshold, but I really have no idea of how to implement this. Any ideas, anyone?

    Hopefully there is a clear distinction between the background and the object.
    You can use IMAQ AutoBThreshold to determine the threshold level for an image. You can select from a variety of methods for determining a binary threshold level. Route the "Threshold Data" output along with your image to IMAQ MultiThreshold, which will quickly apply the threshold to your image. Display the results using WindDraw and the Binary palette (from IMAQ GetPalette).
    This should run close to real-time. Binary thresholding is a fairly fast operation. You will probably end up processing every other image, which is close enough for most projects.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • I have a Cannon EOS 100 and cannot read CR2 files in camera raw. I need to know how to update the camera raw version in CS6

    I have tried to obtain an update from the web-site and uninstalled and re-installed CS6 but still have the problem.

    Some additional related resources:
    Camera Raw plug-in | Supported cameras
    Camera Raw-compatible Adobe applications

  • I updated the pages software yet I'm still on the previous update and cannot open my files. Help!

    I updated the pages software version 5 yet I'm still on the previous update 4.3 and cannot open my files. Can anyone help?

    Have you checked that you are opening the new version? To check this, open a Finder window, select Applications in the sidebar and open the Pages app with the new icon, so you will get the new version.
    Your problem is caused because Apple decided to keep the old iWork applications version after installing the new one. The only thing you have to do is to open it from the Applications folder, or drag the new version to the Dock, so you can access to it quickly

  • I have a problem during the collect data and save it in file with the HP8753C

    Hello,
    I'm using the "HP8753 collect and display data.vi" with the functionnality "save" in file (.txt or xls).
    When I'm using it to collect and save data one time to time, I have no problem. But when I would like to use it to collect and save several data with a structure "For", the HP8753 status will become blocked and the collect and save data in file is disable.
    The only function "collect data" with a structure "for" is Ok but will become not OK with the option "save" in file. Why, please ?

    Hello,
    Thank you for contacting National Instruments.
    It sounds like your instrument is "hanging" or "freezing" when you try to read and save data from it in LabVIEW.
    I took a look at the context help for that particular VI. It appears that if you attempt to read data from the HP8753 while it is also taking measurements, it can cause the instrument to hang. This may be the problem you are experiencing.
    Look over your program and ensure that the instrument is not trying to take new measurements as you read data from it in LabVIEW. Sequence structures may be useful in this regard. If you are still experiencing problems, however, let me know.
    Matthew C
    Applications Engineer
    National Instruments

  • How to remove the words such as the, is , are, and or  from text file

    my problem is
    i want to make an application to do that
    eceives a test file from the user, this file contains a list of words , the program must do the following
    1- Remove the words such as the, is , are, and or
    2- Count the number of occurrences of each word
    3- Display a two column message, the first column contains a word and the second column contains the number of repetitions of this word
    i make number 2 and 3 how can i do number 1

    I would accumulate word frequency in a Map<String, Integer> -- is that what you are doing? But before processing a word I would check to see if it is contained in a Set<String> of common words. In which case further processing of the word is not required.

  • Lightroom 1.41 and Canon 50D CR2 files

    Greetings!
    Can Lightroom 1.4.1 support 50D CR2 files? I can see the thumbnails in the import window but it goes through the motions then tells me the files are either damaged or unsupported. I have the Camera Raw 4.6, and PS and Bridge (CS3) can see them just fine... Getting money out of the company in this economy is tough enough...

    Not directly. the 50D was brought out after 1.4.1 was released. You can get support for the 50D in LR 1.4 simply by converting your RAW files to DNG using the free dng converter (download link here: http://www.adobe.com/products/dng/ )

  • How do I automate the creation of a client secure zone, file/folder structre and integrate a web app

    I want to be able to create a folder and file structure for each accoun subscriber to my site that will allow them to edit their "web-space" on my site.
    So basically when they register for an account they'll have a webpage, a folder structre, a page that will contain a web app.
    I want the user to be able to specify their "account name" so for example if they want John's Page the URL would be www.MYSITE.COM/Johnspage. Would this need to be done through re-directs?
    Thanks in advance

    Hi there,
    BC is not a platform for this sort of thing. You can not automate this process in BC and give them micro sites in this way. Which I have already covered for you.
    Your best to look at other platforms.
    Since you have already basically asked this here:
    http://forums.adobe.com/thread/1264270
    You can add and update that thread and I am closing this one to avoid confusion with other people resonding to you and to avoid double up's

  • My computer has been getting the pin wheel and moving very slow since the i downloaded yosemite

    Whenever i have a video playing from my internet browser it causes my computer to pin wheel and go into thinking mode with all of my apps that are open. It moves very slow and i have to force quit everything and reboot my computer to make it act normal. this all started after the software update. Any suggestions>

    Mine has been moving extremely slow, too.  I had a problem downloading and installing Yosemite and after many conversations with Apple Care, the solution was to remove the 3rd party RAM I had just installed prior to the upgrade.  That solved the download/install problem, but now it's slow as anything.  I opened my activity monitor and sure enough, the memory pressure is at full load so I have to install more memory.  The trick is to make sure it's truly compatible.
    Have you checked your activity monitor's memory report?

Maybe you are looking for

  • How-to get Font weight information while reading a PDF document

    Hello everyone it seems that the available tools to read PDF documents from Java don't allow to get font weight informations about the tokens read from PDF. I need to know if a character is bold in order to recognize if it could be part of a paragrap

  • Missing Photos in PSE 12, but not in PSE 11

    I own PSE 11 & PSE 12.  Several of my photos in PSE 12 have the question mark (missing photo).  These same photos don;t have the question mark in PSE 11.  How can I resolve this issue?

  • Problem with JDBC Comm Channel from UNIX PI Installation.

    Dear Gurus: Inside a standard scenario, we have a receiver comm channel which use JDBC adapter type to connect to a MS Access remote database. The database connection is made like this: JDBC Driver: sun.jdbc.odbc.JdbcOdbcDriver Connection: jdbc:odbc:

  • 2 install programs on disk

    my cd has two installations marked to install adobe photoshop CS6 (64bit) 563 mb     and adobe photoshop CS6           486mb Do I install both? I am running a computer that can run in 64 bit thank you

  • Why am I having update problems again?

    When I started Muse today I received a message that there was a new update and did I want to install. I said yes and it proceeded, when complete I received this pop up message: Title,  Adobe AIR -  "Intial content could not be loaded for this applica