Image copy to folder with name based on image creation date

Hi all,
I am new to Mac OS X and automator so I would like to know the following,
Is it possible to have an automated action that triggers when I attach my camera to USB, and who copies all images to a folder which is named according to the date when the image was created?
Example:
I attach my camera and it shows up as disk image named "NIKON D70" and the images are contained in subfolders "DCIM/100NCD70" (or actually in DCIM/*). I then want all images in these folders copied to my home directory in a subdirectory called something like "Pictures/D70/2007/20070605" where the year folder name and the date folder name should be according to current image creation date (which of course can be different for each image).
I have created a simple automation script that copies images from my camera to a folder named according to current date, but that's not good enough.
Anybody having any hints or ideas of how I can accomplish this?
Regards
Anders
Mac Pro, 2x2.66GHz, 5GB, ATI X1900 XT   Mac OS X (10.4.9)  

Open the AppleScript Editor in the /Applications/Utilities/ folder and run:
tell application "Finder"
repeat with this_file in (get files of window 1)
set the_date to creation date of this_file
set folder_name to ((year of the_date as string) & "-" & day of the_date & "-" & month of the_date)
try
make new folder in window 1 with properties {name:folder_name}
end try
move this_file to folder folder_name
end repeat
end tell
(75533)

Similar Messages

  • Error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT

    error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT  nfs sharing

    Never mind, I already found the solution myself.
    What I did wrong was:
    - not copying the master image to the nbi folder
    - selecting the netinstall-restore.dmg image as source to copy to my HD.
    The thing is, when you create a netinstall image for 10.5, the image itself is already included in the netinstall image so you don't have to do anything else.
    With the 10.4 image however, you also have to copy the master image to the NetBootSP0 directory.
    In the *.nbi folder contains an netinstall-restore.dmg file. But that is only to boot you to netrestore, it's not the image itself.
    Other alternative is to copy the images to another folder that you share with AFP and adjust the configuration of netrestore like described in this manual:
    http://www.shellharbourd.det.nsw.edu.au/pdf/misc/osxrestoringnet.pdf
    This manual was also how I figured out that I forgot to copy the image to the NetBootSP0 folder.

  • Upon starting Mac shows image of a folder with ? inside, any help appreciated, thanks.

    As stated above, when I start Mac it shows a white screen with an image of a folder with a ? inside it.
    I have shut it down by holding the power button then pulled the power cord waited 10mins and restarted for the same result.
    Any help would be great.

    Cheers for the info Allan.
    I unfortunately do not have a back up.  It is in the hands of the repairer now, fingers crossed they can save my stuff.
    FYI, i'll be backing up in future.

  • RQ: Receive files in folder with name of the sende...

    Hello,
    I don't know is I'm on the right place and I don't know is there same request, so I apologize if it exist...
    Please, make option the received files to be saved in folder with the name of the sender. For example: my friend with skype name XYZ send me a file 'foo.bar' that will be saved in \My Documents\Skype_save (I changed the default dir); another friend with name XXY send me file 'foo1.bar' and again it will be in \My Documents\Skype_save, but when there are many files it is difficult to sort them and know whose files sended by who... So the good choise is if the files are saved in folder with name XYZ, XXY etc... Example:
    \Skype_save\XYZ\foo.bar
    \Skype_save\XXY\foo1.bar
    I'm sorry for my bad english, it's not my native language. I hope you can understand what I mean with this folders

    There is no automatic option in Skype that can do what you are trying to accomplish. However, you can in advance create save folders named as your contacts and and each time you receive a file, to save the file in the appropriate folder.
    For this to function, you have to set the option in Tools -> Options -> IM settings -> Show advanced options to “Choose a folder where to save the file every time”.

  • Move files into folders based on EXIF Creation Date

    Hi all,
    Being a novice with Applescript I have read what I can find on this forum, but are not able to find exactly what I'm looking for. I think that the posting "Using AppleScript to create folders and place files in them" is the closest I get to what I want but I want to create the folders based on EXIF creation date.
    Let me explain.
    I have a folder that contains thousands of jpg, mp4, mov and avi files; all created by different cameras. I want to bring some order to this and place files in folders based on year, month and date that the file was created (the photo taken or the video captured). This date is stored in the EXIF creation date.
         Take all files in folder A
          foreach file find the EXIF creation date
          move each file into directory tree (at same location is ok) where toplevel is YEAR, next directory level is named accoring to EXIF creation date as MMDDYY
          if no EXIF creation date can be found, fallback to creation date (file property?)
          if no good date is found, leave file alone in folder A for manual sorting; do not use modification date as this may have been altered
         this would create a structure as
         2002
                011602
                        File 1 taken Jan 16 2002
                        File 2 taken Jan 16 2002
                082002
                        File 1 taken Aug 20 2002
                        File 2 taken Aug 20 2002
          2003
                 etc 
         2004
             |   etc
         2014
                 010114
                        File 1 taken Jan 1 2014
    etc etc

    Well, technically that's correct, Frank, but the same could be said of much of AppleScript - the core functionality is limited, but there's a lot you can do.
    For example, it's actually trivial to use Image Events get any given EXIF tag of an image:
    set theFile to (choose file)
    tell application "Image Events"
              set f to open theFile
              set cD to value of metadata tag "CreationDate" of f
      close f
    end tell
    Now, cD will have the value of the CreationDate tag (assuming it exists, of course - you'll need to wrap this in a try/end try statement). Once you have that it shouldn't be too hard to extract the date components, work out the target directory name and move the file.

  • How to Sort transported KM content based on the creation date

    Hi ,
         I transported KM content through ICE offline transfer.  all the files are copied. but the problem is all are copied with the todays date as modified date.
    but I need to sort these based on the creation date.
    all these files are with the xml templates.
    Can only help in this regard
    Thank you

    Hi,
    Enter the format that you have defined in the configuration of the property in the Additional Metadata parameter. Use the syntax customFormat=<pattern>.
    In this link, you have at the end screenshots where to navigate in KM to see the property metadatas of your property:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/645d4357-0701-0010-07bd-a2ea8c4d0aaf
    Here see the Defenitions of the KM Metadata Properties:
    https://wiki.sdn.sap.com/wiki/display/KMC/DefenitionsoftheKMMetadata+Properties
    Regards,
    Praveen Gudapati

  • Production declaration based on order creation date in R/3

    Hi,
    Can we do the production declaaration in R/3 (mfbf) for PPDS planned orders sent to R/3 from APO based on order creation date?
    This is because we need to differentiate between SNP and PPDS planned orders in R/3.
    As there is no differentition in SNP and PPDS orders in R/3, while production decalration,
    it's not possible that only PPDS orders will get consumed (in mfbf).
    SO can we do production declaration based on order creation date instead of order number?
    Please share the information.
    Thanks,
    Vinayak

    Hello Santosh
    Production versions are selected on the standard system according to the basic finish date, however, you can change the standard system behavior with the implementation of the following note:
    351773 - Selection of production versions for planned order
    Alternatively, you may use BAdI MD_MODIFY_PRODVERS to create your own logic to select the production versions.
    BR
    Caetano

  • Importation as referenced in Folder with name of the project impossible?

    Hello,
    I am currently importing my photos as referenced in Aperture and want to automatically create the folder with the same name as my project, but it always create a folder named "test". I can't find where is my mistake? I think I already have already succeeded in doing that in the past.
    2 screen copies (unfortunately in French) to help you understand better:
    During importation I also do a copy (Save) and it also create the same  "test" folder.
    Thanks in advance for your help

    It is finally working after doind the following "Move the user created presets, keyword lists, and so on..." from Trouble shouting mentionned by Leonie.
    I previously did the first 2 steps of repair as below:
    and also "Delete the user preferences" from Trouble shouting but without success..
    As answer to Frank: I imported from a SD card in a card reader and from the HDD
    To: HDD or a NAS.
    but all possibilities had same result.
    My import configuration was as below (similar to Leonie's screenshot):
    Thank you to both of you.

  • Create new folder with name of file?

    I am generating about 20 files from a 3d model. I open the model let's say the name is "delorean" then I want to create a new folder with all the generated files. I'm using a watch me Do to generate the files. The watch me do will save them in whatever folder I specify ahead of time. Should I just specify new folder each time, then rename it with the file name afterwards? If so how do I get the original file name so that I can use it to rename the file. Is there an example of doing something like this somewhere?
    Thanks.
    This forum is great.
    Dan

    I am going to guess that you start off with a single file - what are you doing to generate these files? My *Get Names of Finder Items* action can get a name to use in the *New Folder* action - items passed to the New Folder action will get copied to it, so a little more detail may help in creating the workflow.
    The *Dispense Items Incrementally* action can also be used to dole out the items one at a time - knowing what the workflow is doing would help with the use of this action as well.

  • Automator: Create folder with name and subfolders in it.

    Hello everyone, my question is related to Automator. I work in a company where we have a huge server. Every time a new job comes in it gets a six digits number and a folder with 5/6 subfolder needs to be created. The main folder will be xxxxxx_nameofbrand and will contain 5 subfolder each one of them starting with the six digit number assigned initially followed by 5 tags (always the same ones).
    Everytime it's a long thing to create it manually and copy and paste every number and name, so I thought I could use automator to do it easilly but I always get stucked at the part where I want the 5 subfolder to go in the main one. This is what I had done, but I'm pretty sure there is a faster/easier way to do it.. I'm really new to automator, I know it's potential but don't know how to use it very well..
    I thank you all for the help.

    For this kind of exception, you can just add a Run AppleScript action at the end of the workflow - for example, the following will rename all folders ending with the specified name that are at the specified depth in the structure:
    on run {input, parameters} # remove prefix from folder name
      set sourceFolder to quoted form of POSIX path of (input as text)
      set exceptionName to "Links" # will find a name ending with this (case sensitive match)
      set exceptionDepth to 2 # at a folder depth of this
      set theFolders to (do shell script "find " & sourceFolder & " -name " & quoted form of ("*" & exceptionName) & " -depth " & exceptionDepth)
      repeat with anItem in paragraphs of theFolders # rename without prefix
        tell application "System Events" to set name of folder anItem to exceptionName
      end repeat
      return input
    end run

  • Create folder with name Client150412n

    Hi,
    I'm new to ApplesScripting. I've found this script that I'd like to change:
    --This script will make a new folder on the desktop with current date and dialog box
    --format the date to 2010-11-19
    tell (current date) to get day & (it's month as integer) & (it's year as integer)
    set TheDateFormat to the result as text
    -- asks for folder name with date as default answer
    set TheFolderName to text returned of (display dialog "Name the folder" default answer TheDateFormat)
    --make folder with date & user entered text
    tell application "Finder"
      make new folder with properties {name:TheFolderName}
    end tell
    The desired changes:
    - Date format should be: 150412 + a letter (a, b, c) if the folder to be created already exists.
    - Place the cursor at the start of name dialog, no selection active.
    - The new folders should be created in /Users/Hans/Dropbox/Jobs/
    Thanks,
    Hans
    Another question is related to execution of the script:
    - How can I start the script easily with a shortcut key or a Dock icon?
    - Is it possible to select client name from a plain text file containing client names in separate lines?
    - Is it possible to have zip files automatically unzipped to subfolder names with the zip package name?
    - Regarding the Dock icon I could even imagine that I drag a zip or other file from an email or the Desktop to the icon and that I only have to type the clients name to have the file moved to a new folder.

    save script as an application bundle.  Drag app to dock.
    Set short-cut key to app.
    AppleScript   Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition the book
    AppleScript Language Guide pdf download the pdf file

  • LR3 bug: Files from a folder with name ending with "." (dot) cannot be imported

    This is a weird one Surprisingly, directories with names ending with a dot, don't show in the Import dialog and also cannot imported by using synchronization. So, if you have any folder named "Flowers, trees etc." ... you cannot import it.

    And what happens if you delete the dot at the end of the folder name?

  • Copy to folder WITH metadata

    I was clearing off some photos I rarely use into a folder I was going to store on my ext drive. Afterwards I realized I had put some on there that I needed. When I reimported them they went to the end of the line rather than where they originally were.
    I was wondering how to export them to a folder with the metadata intact.
    Thanks in advance
    Rob

    Rob
    WHy not have a second iPhoto Library on the external drive?
    Simply copy the iPhoto Library Folder from your Pictures folder to the External. Then, hold down the option (or alt) key key and launch iPhoto. Select 'Choose Library' and navigate to the external.
    Now you have a secnd library on the HD. From it, delete any pics you don't want in it.
    Then repeat the option (or alt) key trick and select 'Choose Library' again. This time navigate to the Pictures Folder and pen that Library. From it, delete the pics you don't want there.
    iPhoto Library Manager will make the proces of moving pics and metadata from library to library much simpler.
    Regards
    TD

  • Lion, Finder quits when copying a folder with idlk files (indesign cs4)

    I have a network volume on solaris which I backup folders to the local desktop. if I drag the folder to the desktop in lion, it gives permission issues once it gets to the idlk file, the finder resets, disconnects the network drive and does not copy. If i use snow leopard, the finder works fine and skips the the .idlk from all these guys having open files on the server. This is disruptive for my backups because often users have files open. How do i skip or ignore the .idlk files when I am backing up entire directories?

    This sounds like a Lion bug...File it with Apple...
    Can you use a tool other than the Finder to do the backup? Perhaps you could use an Applescript Droplet or something.
    Then you could try some other tool (perhaps 'ditto') to do the copy. Worst case you can copy the folder to a temporary location on the hard drive and then copy that copy to the Solaris server...

  • Help with Flex based popup windows and data population.

    Hello, I need a bit of help with Flex popups. I have a flex
    application that uses a popup window when you click on a button and
    displays information about the image above the button the user
    clicked. I have about 4 images and I need to be able to display
    information about each of them through the popup window when users
    click on the buttons below the image.
    At this time, I am trying to do this from somewhat of a
    "static" point of view because I do not believe my hosting company
    supports Flex Data services. You will find my code below.
    First File.
    <?xml version="1.0" encoding="utf-8"?>
    <!--Application Initialization -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" width="850" height="750"
    cornerRadius="10" borderColor="#000000"
    backgroundGradientColors="[#1b3434, #000000]">
    <!-- Popup-->
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    [Bindable]
    private var win:IMSAI;
    private function init():void{}
    private function createPopup():void{
    win=IMSAI(PopUpManager.createPopUp(this,IMSAI,true));
    win.title = 'IMSAI.Net';
    win.x = -500;
    win.y = 0;
    customMove.end();
    customMove.play();
    ]]>
    </mx:Script>
    <mx:Style>
    TitleWindow {
    borderStyle:solid;
    borderThickness:2;
    </mx:Style>
    <mx:Parallel id="customMove" target="{win}">
    <mx:Move duration="2000" xTo="{(stage.width - win.width)
    / 2}" yTo="{(stage.height - win.height) / 2}" />
    <mx:WipeDown duration="2000" />
    </mx:Parallel>
    This is the code to trigger the popup when a user clicks on
    the button. The code below is the code for the popup.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical" creationComplete="init()"
    close="PopUpManager.removePopUp(this)"
    showCloseButton="true" alpha=".8"
    headerColors="[#000000,#1F3F62]" color="#FFFFFF"
    minHeight="200" minWidth="300"
    backgroundColor="#000000" title="IMSAI.net" width="520"
    height="394" verticalAlign="middle" horizontalAlign="center">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    private function init():void{}
    ]]>
    </mx:Script>
    <mx:Canvas width="470" height="338">
    <mx:Image x="10" y="10" width="140" height="103">
    <mx:source>file:///C|/ColdFusion8/wwwroot/IMSAI/Web-App/Site_Images/IMSAI
    Final Movie.swf</mx:source>
    </mx:Image>
    <mx:Text x="10" y="121" text="Description:" width="75"
    height="25" fontWeight="bold" color="#ff0000"/>
    <mx:Text x="158" y="10" text="Client:" width="52"
    height="28" fontWeight="bold" color="#ff0000"/>
    <mx:Text x="196" y="10" text="IMSAI Microcomputers
    &amp; Fischer-Freitas Company" width="252" height="39"/>
    <mx:Text x="159" y="46" text="Industry:"
    fontWeight="bold" color="#ff0000"/>
    <mx:Text x="216" y="46" text="Computer &amp;
    Microcontroller Manufacturing." width="232" height="35"/>
    <mx:Text x="83" y="121" text="IMSAI.net is the front-end
    web application for IMSAI Computer " width="355"/>
    <mx:Text x="10" y="136" text="manufacturing, customer
    support, and order processing. Driven by a Microsoft database
    back-end, this application includes rich flash forms, site search
    capabilities, and flash content. Currently under phase II of a
    three phase development plan, the e-commerce logic and processing
    capabilities are under development. Once finished, this application
    will be able to process orders provide customers with instant order
    confirmation numbers, shipment dates, and payment processing."
    width="428"/>
    <mx:Text x="10" y="244" text="Technologies:"
    fontWeight="bold" color="#ff0000"/>
    <mx:Image x="100" y="244" width="50" height="50">
    <mx:source>file:///C|/ColdFusion8/wwwroot/Sapphire
    Development/content/cf8icon.jpg</mx:source>
    </mx:Image>
    <mx:Image x="244" y="244" width="50" height="50">
    <mx:source>file:///C|/ColdFusion8/wwwroot/Sapphire
    Development/content/flashlogo.jpg</mx:source>
    </mx:Image>
    <mx:Text x="53" y="290" text="Coldfusion 8 Enterprise"
    height="30"/>
    <mx:Text x="230" y="290" text="Adobe Flash 8"/>
    </mx:Canvas>
    What I want to do is either be able to create a popup file
    for each button and photo, or find a way to pass a name like a
    button ID that corresponds to a XML data structure and then
    provides the appropriate data for the photo. I have tried altering
    the first page of code with the "public" declaration to allow for a
    second popup file for each button and image, but the IDE won't
    allow me to do such because it creates errors stating I can only
    have one public declaration of the kind and function above per
    application. Help resolving this would be greatly appreciated.
    Thank you.

    I have an idea of what I want to do. I am just having
    difficulty articulating how to go about such. I know I want to find
    a way so that if a user clicks on button 1, button 1 will send some
    kind of variable. For example, a user clicks Btn1 under a picture.
    Btn1 sends some kind of variable or binding to a data structure
    which returns the picture's description, price, etc. and calls the
    popup to display that data in a form like manner. Then the user
    click Btn2 which does the same thing. The only purpose of the popup
    is to display the data.
    Do I create a data structure with a related name to say a
    button name so when the btn is clicked, the a variable title btn1
    will prepend itself to the data structure like
    {btn1.imagename}
    {btn1.price}
    {btn1.description}.
    I want each btn to call a different set of data about each
    picture because right now, the code I have is allowing me multiple
    buttons, but is just displays the popup. Is there a way to create a
    separate popup window for each button? Thats seems as though it
    would be easier. Thank you for your help.

Maybe you are looking for

  • Reg - Work Flow Program ( ABAP )

    Hi, Pls advise Where i get the Program ( ABAP Code ) in the Work Flow. Example : I need to add one more plant in the WorkFlow .. Thanks Roy..

  • Need to see ALL files in folder when saving from Word 2003 OR Word 2013 program

    Here is the issue.... A customer of mine has the need to save files in order (Communications with customers by date and time) BUT..... when saving the file word does not let him see ALL the documents (.doc AND .docx) in the save dialog. (I know we co

  • Black background in youtube firefox only

    So this just came out of no where today. A random part of the background on YouTube is now black. As show in the image. http://i62.tinypic.com/m7reie.jpg This only happens with Firefox and even in safe mode. I tried chrome and i do not get the black

  • Illustrator CS6: Missing small pixels box that should follow the cursor when creating objects

    Somehow I've managed to disable a feature in Illustrator CS6 that does two things: 1) it causes a small box to follow the cursor when I'm drawing an object 2) the light green lines or x's are gone now, too. How can I get them back? Are they only visi

  • TPVS  - Change mileage in /sapapo/vs01.

    Hello, I have a requirement to change the mileage within the shipment in the following 3 tabs: tabular planning, details, and geographical overview.  I have tried using BADI /SAPAPO/VS_OPT_PREP but the value always reverts back to the value on the tr