Options

Help with copying pics from CF Card

spocklingspockling Registered Users Posts: 369 Major grins
edited March 23, 2005 in Finishing School
Is there any way that I can run a script/batch file/action in either xp, dos or photoshop cs that would download my pictures from my cf card(both raw and jpg) into separate directories?

I am trying to automate a few things to speed up my workflow.

Thanks in advance for any help.

Comments

  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 22, 2005
    spockling wrote:
    Is there any way that I can run a script/batch file/action in either xp, dos or photoshop cs that would download my pictures from my cf card(both raw and jpg) into separate directories?

    I am trying to automate a few things to speed up my workflow.

    Thanks in advance for any help.

    bump. oh and you should ping nikolai, he's good at this stuff deal.gif
  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited March 23, 2005
    It depends on how much automation you want
    If you simply want it *done*, always in one way and don't mind some batch file programming it can be relatively easy:
    Create new cmd/bat file and set its contents to the following:
    @echo off
    : Set these names to your setup/liking..
    SET SRC_DIR=F:\DCIM\MISC
    SET JPG_MASK=*.jpg
    SET MOV_MASK=*.mpg
    SET RAW_MASK=*.srf
    SET TGT_ROOT_DIR=%HOMEDRIVE%%HOMEPATH%\Files_From_Camera
    SET JPG_DIR=My_New_Jpegs
    SET MOV_DIR=My_New_Movies
    SET RAW_DIR=My_New_Raws
    :----
    : Now to the confirmation
    :-- 
    echo This will copy files from %SRC_DIR% into %ROOT_TGT__DIR%
    echo Press ENTER to continue, Ctrl+C to quit
    pause>nul
    :====
    : Check all the dirs
    :==
    SET TST_DIR=%SRC_DIR%
    if not exist %TST_DIR%\nul then goto NODIR
    SET TST_DIR=%TGT_ROOT_DIR%
    if not exist %TST_DIR%\nul then goto NODIR
    SET TST_DIR=%TGT_ROOT_DIR%\%JPG_DIR%
    if not exist %TST_DIR%\nul then goto NODIR
    SET TST_DIR=%TGT_ROOT_DIR%\%MOV_DIR%
    if not exist %TST_DIR%\nul then goto NODIR
    SET TST_DIR=%TGT_ROOT_DIR%\%RAW_DIR%
    if not exist %TST_DIR%\nul then goto NODIR
    :****
    : all folders seem to be ok, let do some copying..
    :**
    for %%f in (%SRC_DIR%\%JPG_MASK) do copy /b /v %%f %TGT_ROOT_DIR%\%JPG_DIR%\
    for %%f in (%SRC_DIR%\%MOV_MASK) do copy /b /v %%f %TGT_ROOT_DIR%\%MOV_DIR%\
    for %%f in (%SRC_DIR%\%RAW_MASK) do copy /b /v %%f %TGT_ROOT_DIR%\%RAW_DIR%\
    goto EXIT
    :NODIR
    echo Directory %SRC_DIR% not found, please create one first
    goto EXIT
    :EXIT
    echo Press ENTER to exit or simply close this window...
    pause>nul
    
    

    Same stuff can be achieved in a less arcane way via VB script (which is supported on most of the nowadays PCs automatically)

    Finally, if you want auto detection of the card insertion/removal, persistent settings, fancy progress indicator - well, this is a subject for custom programming...:-)

    HTH

    Nik
    andy wrote:
    bump. oh and you should ping nikolai, he's good at this stuff deal.gif
    Thanks for the referral, Andy, much obliged:-)
    "May the f/stop be with you!"
  • Options
    spocklingspockling Registered Users Posts: 369 Major grins
    edited March 23, 2005
    Nikolai, because Canon cameras add dirs on the cf card after so many pics, how can the set src dir line be changed to accomodate that problem? Is there a wildcard or a switch that can be added to that line?


    Thanks again
  • Options
    NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited March 23, 2005
    Steve
    spockling wrote:
    Nikolai, because Canon cameras add dirs on the cf card after so many pics, how can the set src dir line be changed to accomodate that problem? Is there a wildcard or a switch that can be added to that line?


    Thanks again
    If you know the dir naming pattern and it's simple enough (like folder1, folder2, etc) you can wrap the whole thing into another for-loop.
    You can check directory existence via
    if [not] exist YOUR_DIR\nul
    

    If it is not that simple and you only know the location (or even need to ask for it), you have to go with more complex solution.
    VBS (or JS, for that matter) can take you a bit farher. Complete refererence on Windows scripting can be found at this msdn location. Pay especial attention to the file system object of the script runtime, that's where you can enumerate all the folders and copy files. They have plenty of examples, if you did any basic scripting before you'll find it very easy to follow..

    HTH

    Nik
    "May the f/stop be with you!"
Sign In or Register to comment.