edmun
Posts: 39
Joined: Thu Jan 09, 2014 11:37 am

How can I select files with specific date as an attachment

Wed Aug 17, 2016 3:34 pm

Hi Guys

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:

Image

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.jpg
The bit I am missing is the part after -a where I have to specify the path to the file.

Anyone could help me with solving this puzzle?

Return to “Beginners”