Hey all...I am hoping to be a contributor at some point here but i need a little help with our camera array project.
I am writing a batch file to download the images from camera and have some syntax issues I cannot resolve.
We have 60 A810's. Shooting happens...then we will manually turn off remote enabled in the menu so that we can connect to them via PTP. the script then gets a list of cameras and I want to loop through the list and download all files off all the cameras.
How do I connect to each camera via bus and dev # to DL all images?
Thanks all..
Here is what I have so far...
TITLE TRACY RULEZ
cls
@echo off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
REM Create List of cameras with BUS id
C:\Users\tracy\Desktop\scipts\ptpcam -l > C:\Users\tracy\Desktop\scipts\cameraList.dat
REM ~ Gathers the info from accesible information on the camera by polling certain PTP commands
echo Checking Camera Info...
C:\Users\tracy\Desktop\scipts\ptpcam -i > C:\Users\tracy\Desktop\scipts\tmp.dat
FOR /F "tokens=2 delims='" %%A IN (C:\Users\tracy\Desktop\scipts\tmp.dat)DO SET theDir=%%A
FOR /F "tokens=2 delims='" %%A IN (C:\Users\tracy\Desktop\scipts\tmp.dat)DO mkdir %%A
FOR /F "tokens=2 delims='" %%A IN (C:\Users\tracy\Desktop\scipts\tmp.dat)DO copy C:\Users\tracy\Desktop\scipts\tmp.dat %%A\camID.dat
FOR /F "tokens=2 delims='" %%A IN (C:\Users\tracy\Desktop\scipts\tmp.dat)DO C:\Users\tracy\Desktop\scipts\ptpcam -L > %%A\Filelist.dat
timeout 2
REM ~ Creat a list on camera side with proper download path ******REMEMBER THE ////////////***********
REM ~ This is a file on the cameras named lptgui in the CHDK LUA script Place on the CHDK folder dcimdl MUST BE FALSE
echo CREATING fILELIST ON CAMERA
C:\Users\tracy\Desktop\scipts\ptpcam --chdk="luar require('lptpgui').dcimdl(false)"
timeout 2
cls
REM ~ Downloads fileslist with /// seperators from camera to the parsefile.txt
echo DOWNLOADING FILELIST
C:\Users\tracy\Desktop\scipts\ptpcam --chdk="download A/ptpgui.txt C:\Users\tracy\Desktop\scipts\%theDir%\parsefile.txt"
timeout 2
cls
REM ~ Creates the IMAGES directory in %theDir% (AKA Camera ID Folder) Created
echo Creating DL Dir @ %theDir%\IMAGES
mkdir %theDir%\IMAGES_ON_Camera_X
REM ~ Creates the path variable and filename variable to do the ptp CHDK download using the same filename that the camera creates for tracking
REM ~ Thinking maybe a time stamp here too. can do that on the ptpgui file created on camera end.
for /f "tokens=* delims=/" %%b in (C:\Users\tracy\Desktop\scipts\%theDir%\parsefile.txt)DO (
set camPath=%%b
set camPath=!campath:~0,24!
set localFilename=%%b
set localFilename=!filename:~16,12!
C:\Users\tracy\Desktop\scipts\ptpcam --chdk="download" %campath% C:\Users\tracy\Desktop\scipts\%theDir%\localFilename"
ENDLOCAL
echo DONE DIDDLEY DONE