Results 1 to 2 of 2
Hi all,
I currently have a USB camera attached to my computer running Ubuntu 10.04 and I was wondering how I could write a Linux script such that whenever it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-20-2013 #1Just Joined!
- Join Date
- Dec 2012
- Posts
- 4
Script to Automatically Name and Transfer Files Across an Ad-Hoc Netwo
Hi all,
I currently have a USB camera attached to my computer running Ubuntu 10.04 and I was wondering how I could write a Linux script such that whenever it took a picture that picture would be given a certain name (IE. '1'), then transferred over an ad-hoc network to be stored on another computer also running the same version of Ubuntu.
- 01-24-2013 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
Do you mean the camera is always attached, even when someone takes a picture?
How does Linux access the camera's storage, do you know? It could be via gphoto2, mounted as a USB storage device, or some other trickery. If treated as USB storage, then it would be easy to write a script to monitor a directory, sort files by modification date, and copy them to some other directory (network-shared or otherwise). You can make the script a daemon, or simply use cron. I would test heavily before automating the deletion of files on the camera.
If gphoto2, you'll have to get more involved. You can read up on the APIs, etc. here.
I'm not sure about auto-naming the files, but there may be a way to do that from within the camera itself.


Reply With Quote
