Community discussions

MikroTik App
 
msokaczd
just joined
Topic Author
Posts: 5
Joined: Thu Feb 09, 2023 12:09 am

Send last file via Email

Thu Feb 09, 2023 12:15 am

I need script to send newest file via email and delete the file. The new file is uploaded every 3 hours. The problem is that every time file has new name. I know how to send file with specific name, but not when file name is changing.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Send last file via Email

Thu Feb 09, 2023 11:31 am

How is the file uploaded to the Router?
Why does it change name?
Can not the file be sent directly from the uploader instead of going through the Router?



-----------------------------------------------------------------------------------------------
Use Splunk> to log/monitor your MikroTik Router(s).--> MikroTik->Splunk :mrgreen:
Backup config to Gmail -->Backup
Block users that tries ut use non open ports -->Block][/b]
Last edited by Jotne on Sun Feb 12, 2023 10:13 pm, edited 2 times in total.
 
msokaczd
just joined
Topic Author
Posts: 5
Joined: Thu Feb 09, 2023 12:09 am

Re: Send last file via Email

Sun Feb 12, 2023 3:31 pm

It uploaded via FTP from CCTV camera, every time is different name because of timestamp. It cant be send from CCTV camera via email.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Send last file via Email

Sun Feb 12, 2023 3:46 pm

only timestamp without no any fixed parts?
like cam4_20230212.jpg

YOU MUIST PROVIDE DETAILS EVERYTIME.
It's a – having to do interviews all the time for the most trivial questions.

For example: provide some real names.
 
msokaczd
just joined
Topic Author
Posts: 5
Joined: Thu Feb 09, 2023 12:09 am

Re: Send last file via Email

Sun Feb 12, 2023 8:09 pm

it has fixed part, for example test_110220232305.jpg
 
msokaczd
just joined
Topic Author
Posts: 5
Joined: Thu Feb 09, 2023 12:09 am

Re: Send last file via Email

Sun Feb 12, 2023 8:20 pm

After sending im deleting that file

Who is online

Users browsing this forum: No registered users and 20 guests