waveform-computing / compoundpi

A project for controlling multiple Pi cameras simultaneously

Home Page:http://compoundpi.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change file names

tcconway opened this issue · comments

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!

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.)