Community discussions

MikroTik App

Search found 17 matches

by Prometej
Tue Aug 24, 2021 11:39 am
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

Thank you. It turned out but with oddities and dances with a tambourine.
by Prometej
Tue Aug 24, 2021 4:53 am
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

Good afternoon. It can be formatted for understanding, and not in the machine version. I would post both options, but for some reason the "code" tags are not perceived twice in the same message by the forum. I did not want to make an exact mask for regular expressions, since it was only ne...
by Prometej
Mon Aug 23, 2021 8:03 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

A good and simple solution that I discarded because all files will be deleted for the specified month. You can stay with one single backup file in the new month. Of course there are backup files in the mail. Really... not... Delete the backup of 2 months ago, previous month and actual month are unt...
by Prometej
Mon Aug 23, 2021 7:48 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

For example something like: :local month <from your function actual month - 2> :local id [/system identity get name] /file remove [find where name~"^$id-[0-9]{4}$month[0-9]{2}-[0-9]{4}\\.(backup|rsc)\$"] Once you set 1st time the directory clean, automatically delete 3 monts old backup A ...
by Prometej
Mon Aug 23, 2021 7:37 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

I think if you have already the date on ISO8601 like 20210823 format on filename, is useless check time. Honestly, I'll tell you. I had no desire to forge file names. Process the creation and modification date of the object faster than extracting the date from the file name. And I want a kind of un...
by Prometej
Mon Aug 23, 2021 7:20 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

If you check the .id, the file on same folder are indexed on creation time, but on creation-time appear LAST MODIFIED time... /file> :put [print as-value] .id=*1f0001a6;creation-time=jan/02/1970 02:00:38;name=flash/pub;type=directory; .id=*1f0001a7;creation-time=jan/02/1970 02:00:38;name=flash/firm...
by Prometej
Mon Aug 23, 2021 7:14 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

I don't understand your thought. Try explaining more openly.
by Prometej
Mon Aug 23, 2021 7:02 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

inside routeros filesystem?
It is. There is a need to clean the MikroTik OS file system according to certain criteria.
Developers of MikroTik OS did not take care of the functionality of converting and comparing this in the format "Date."
by Prometej
Mon Aug 23, 2021 6:57 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

Some hint: International / ISO8601 date: 2021-08-23 accept "today" parameter, instead of date, for use current date obtained from routeros Good afternoon. Do you propose to change the date output and execute it in ISO format? You can generate a date in any format from the output array of ...
by Prometej
Mon Aug 23, 2021 11:16 am
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

Thank you for your thought. Corrections have been scripted. Fixed: # Calculate date shift by specified number of days :if ($ChangeDay > 0) do={ :set $Day ($Day + $ChangeDay) :while ((($Day > ($ArrayMonthDay->($Month-1))) and ((($Year%4)!=0) or ((($Year%4)=0) and ($Month!=2)))) or (($Day > (($ArrayMo...
by Prometej
Mon Aug 23, 2021 8:58 am
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Re: Script function for converting and shifting the standard date to OS Mikrotik

Calculation of a high year, when in February + 1 day did not realize due to the lack of technical work with fractions. This is an error in operation. If you have a technical solution, please describe it. Fixed error with date reduction: :put ([$FuncDateConvert "jan/01/2024" -10]->0) 12/22/...
by Prometej
Sun Aug 22, 2021 5:16 pm
Forum: Scripting
Topic: Script function for converting and shifting the standard date to OS Mikrotik
Replies: 24
Views: 4616

Script function for converting and shifting the standard date to OS Mikrotik

Script function for converting and shifting the standard date to OS MikroTik Start variables: * First mandatory variable in "aug/22/2021" or "08/22/2021" format. * Second optional variable in -5 or 0 or 5 format. Specifies how many days forward or backward you want to move the to...
by Prometej
Wed Jul 11, 2012 9:58 am
Forum: General
Topic: NAT masquerade outbound port problem
Replies: 9
Views: 5602

Re: NAT masquerade outbound port problem

Example for setting NAT: /ip firewall nat add action=masquerade chain=srcnat comment="NAT Networks private" \ disabled=no src-address-list=SRC-NAT /ip firewall address-list add address=10.254.23.128/28 disabled=no list=SRC-NAT add address=192.168.30.2 disabled=no list=SRC-NAT add address=1...
by Prometej
Mon Jul 09, 2012 1:19 pm
Forum: General
Topic: Failure of the firewall - the section "mangle"
Replies: 0
Views: 3671

Failure of the firewall - the section "mangle"

When working in the system fails the firewall - the section "mangle". The problem comes when trying to process the incoming UDP traffic on the router from the Internet (for example traffic torrent). The problem manifests itself in the termination of the account and coloring inbound Interne...
by Prometej
Sat Mar 10, 2012 12:17 pm
Forum: General
Topic: Question on "Firewall -> Mangle"
Replies: 0
Views: 732

Question on "Firewall -> Mangle"

question on "Firewall -> Mangle" Why in section "Mangle" when creating a rule forbidden select several "Connection Mark"? For this reason you need to create more than one rule. question on "Firewall -> Mangle" Почему нельзя в разделе "Mangle" при соз...
by Prometej
Sat Mar 10, 2012 11:53 am
Forum: General
Topic: Restricting p2p traffic
Replies: 3
Views: 1158

Re: Restricting p2p traffic

1) colorize a useful Internet traffic.
2) The rest of the Internet traffic is P2P.
Other ways at the moment no.
by Prometej
Sat Mar 10, 2012 7:07 am
Forum: General
Topic: Restricting p2p traffic
Replies: 3
Views: 1158

Re: Restricting p2p traffic

I apologize for the broken English.
Select P2P traffic encryption enabled torrent client to the almost impossible at the moment.
The easiest way to select your desired traffic. Everything that does not count in the allocation of P2P traffic.