I am currently working on a notification system which would send me an e-mail as soon as my raspberry pi camera will detect the motion (and create a jpg + video).
So far I am using the RPi Cam Control which generates files in the media folder:

and using sendemail I am trying to send the latest created jpg to my e-mail address
Can someone please explain to me, how can I mask the filename?
I have thought that usage of "?" will be enough, but seems that I am not so good in this matter:
Code: Select all
currentdate=$(date +%Y%m%d) && sendemail -f sender@server.com -t recipient@anotherserver.com -u test2 -m attachment -a /var/www/cctv/media/vi_00??_$currentdate_??????.mp4.v????.th.jpgAnyone could help me with solving this puzzle?