PTP Extension help - need to copy files off the SD card - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

PTP Extension help - need to copy files off the SD card

  • 3 Replies
  • 1626 Views
PTP Extension help - need to copy files off the SD card
« on: 29 / October / 2012, 19:53:01 »
Advertisements
Hi, I am very new to CHDK. I am using a Canon PowerShot S100 and am capable of downloading images from the camera via the USB through PtpCamGui.

I've looked at the lptpgui.lua file and have somewhat of an understanding as to how the files are copied over to the computer.

My only task is this: I want to be able to run the ptpcam file from the command menu, and copy the files from the SD card to a hard-coded (in .lua) directory.

Could someone please point me to the line in the lptpgui.lua script where I can hard-code the path? I think it is being passed as a parameter now. I am guessing that it is this line that needs to be modified:
Code: (javascript) [Select]
hfile:write(path .. "/"  .. "|" .. fd[i] .. "|" .. os.date("%Y%m%d%H%M%S", stat.mtime) .. "\n")
I just don't know how it needs to be modified.
Thank you!

*

Offline reyalp

  • ******
  • 12002
Re: PTP Extension help - need to copy files off the SD card
« Reply #1 on: 29 / October / 2012, 23:31:50 »
I don't know much about the ptpcamgui code, but I"m pretty sure  the PC side filename would not be set in the lua code (which is only run on the camera), it would be in the ptpcamgui autoit code.
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1262
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: PTP Extension help - need to copy files off the SD card
« Reply #2 on: 30 / October / 2012, 09:24:24 »
Yes, lptpgui.lua is only a little helper script. It sends a text file with a list of picture files informations in DCIM folder to the PC. With this informations ptpCamGui can start an automatical picture download (You can choose: all files, only new files or a number of the last files).

Path and filename is set in ptpCamGui: A/DCIM/ + subdir + filename

msl
CHDK-DE:  CHDK-DE links

Re: PTP Extension help - need to copy files off the SD card
« Reply #3 on: 31 / October / 2012, 16:19:36 »
Brilliant! Thank you!


 

Related Topics