OK, !chdku.downloaddir("A/DCIM/100_0507","C:/IMG")
works. Is it possible to make it even better by making it automatically parse through all subdirectories so that you could give it a command like this:
!chdku.downloaddir("A/DCIM/","C:/IMG")
This way you don't have to figure out what the folder is called. Is this possible?
Recursing through the directories is possible. As I mentioned previously, chdkptp does not currently have the capability to create directories on the PC side, so it can't duplicate the directory structure. I do plan to add this at some point, along with functions for recursive download. I don't have any schedule.
In the meantime, you could build filenames from the directory names, so e.g.
A/DCIM/100_0507/IMG_0001.JPG becomes 100_0507_IMG_0001.JPG or IMG_100_0507_0001.JPG or whatever.
Implementing this is left as an exercise to the reader

So it is possible for it to work correctly. Maybe comparing your code to ptpcam's reboot code will shed light on what the differences are.
Sigh. As I already said:
.reboot() does exactly the same thing ptpcam "reboot" does.ptpcam reboot just runs "reboot();" as lua on the camera. chdkptp .reboot() does the same thing
ptpcam sleeps 2 seconds and tries to reconnect automatically.
chdkptp doesn't try to reconnect automatically.
The only difference I see is that chdkptp will try to disconnect first when you do 'c', since it doesn't know the connection has gone away.
You can try this, which should emulate ptpcam more closely.
con> .sleep(3000); reboot()
con> dis
(wait for camera to reboot)
___> c
The sleep(3000) waits 3 seconds before rebooting. You will need to do the dis command before that time is up.