martedì 11 settembre 2012

A batch to download photos from sd card to PC

These MS-DOS batch lines are useful to transfer your photos from SD card to a destination folder on your PC in an easy, quick and organized way. The batch also puts raw files in a separate folder. If you want them in the same folder you can always modify it.

Here there are the batch lines:

cls
@echo OFF
ECHO 1)-Creating folders: %1 , %1\RAWs, %1\Pano_Source
ECHO                 .
mkdir "DESTINATION PATH"\%1
ECHO                 ..
mkdir "DESTINATION PATH"\%1\RAWs
ECHO                 ...
mkdir "DESTINATION PATH"\%1\Pano_Source
ECHO 2)-Copying files...
ECHO      WAIT PLEASE!
for /D /R SOURCE_DISK_LETTER:\ %%e IN (*DCIM) DO xcopy %%e\*.jpg "DESTINATION PATH"\%1  /v /q
for /D /R SOURCE_DISK_LETTER:\ %%e IN (*DCIM) DO xcopy %%e\*.RAW_FILES_EXTENSION"\%1\RAWs  /v /q
explorer "DESTINATION PATH"\%1

ECHO Operation completed.
pause()
exit



Open notepad, paste these lines in it and personalize them on your needs. Now save the file as *.bat
You will lunch it from a DOS prompt [windows menu>>>run "cmd" then go to the folder where the .bat file has been saved: cd "file folder path"]. To call it digit the name of the batch file followed by the name you want to give to the final work folder: YOUR_FILE_NAME.bat "Your work folder name".
Pano_source is an empty folder where photos wich have to be stiched in a panorama will be manually moved; you can delete the line "mkdir "DESTINATION PATH"\%1\Pano_Source" if you retain you don't need this folder....as you can add many other folders on your needs.

Leave a comment if you appreciate or have some troubles.

Have fun!