waveform-computing / compoundpi

A project for controlling multiple Pi cameras simultaneously
http://compoundpi.readthedocs.org/
GNU General Public License v2.0
61 stars 19 forks source link

Change file names #57

Closed tcconway closed 6 years ago

tcconway commented 6 years ago

Hi there. Is there any way to change the naming format? I have all static IPs on my PIs and anticipate sorting will be easier if the filename starts with the IP? Thanks!

tcconway commented 6 years ago

To possibly answer my own question, I believe there are two routes to go:

1) Use a batch script instead of the CLI: http://compoundpi.readthedocs.io/en/latest/batch.html

2) Batch reorder/rename the files, assuming all your Pis have sequential IP Addressing, with something like:

rename -n 's/(.+)-(.+)-(.+).jpg/$3-$1-$2.jpg/' *.jpg

(Once confirmed it works, remove the -n to actually perform the operation.)