The following command lists the subfolders in a given folder (for example /store_00010001/DCIM). The -f flag specifies the folder, the -l flag specifies to list the sub folders:
$ gphoto2 -f /store_00010001/DCIM -l
In order to turn off the recursive listing, the --no-recurse flag can be applied.
One might try to list the folders the root folder / in order to start down- or uploading files.
Listing files in a given folder
This is almost the same as above, but with -L instead of -l.
$ gphoto2 -f /store_00010001/DCIM/106___10 -L
The listing prints an image's number and its name on a line. The numbers can be used to download a range of images.
Downloading a specific file
Downloading a specific file by its filename doesn't seem to be possible. The --filename names the files that are downloaded, not the files to be downloaded.
The image numbers can be found out by using the -L flag.
Using the --new flag
Apparently, -P (to get all files from a folder) can be combined with the --new flag so that only files will be retrieved that are not already downloaded.
Putting a file to the device
The -u flag specifies the file which should be uploaded to the device:
$ gphoto2 -f /store_00010001/Movies -u foo.mp4
Deleting a file
A file to be deleted can be named with the -d flag: