I have a question about removing specific files from a folder.
I have an automation triggered by a motion sensor that calls a script. the script is taking pictures from a IP camera and sends it by pushbullet and mail. After that I want to remove the file. I have found shell commands and how to remove say all pictures from a folder. The problem is that sometimes when the automation is triggered many times after each other the first trigger removes even the pictures from the second trigger before it had time to send it.
The photos is named by the current date and time like YYYY-MM-DD_HH.MM.SS.jpg what I would want is to take the picture, name it as above, send it in an mail and then remove it without removing other photos in the same folder. Does any one know hot to do that?
Thanks, yes that’s an easier way. The fact is that i want to take like 5 snapshots and then send all of them in the same email. But then i just could use snap_1, snap_2 etc. But what i want is to be able to take photos quite rapidly and send them.
I would also be able to upload them to google drive. Do you know how to do that?
The email is time stamped so no need to include it in the file names (there’s also the time and date on the camera on screen overlay). I had to introduce the 1 second delays because the snapshots are taken very rapidly and all the images were esentially the same.
@tom_l
Okay! You don’t need a delay between the last photo and sending the email? I had to have a couple of seconds otherwise i get an error saying that the file doesn’t exist.