Community discussions

MikroTik App
 
eldoncito2019
Member
Member
Topic Author
Posts: 333
Joined: Fri Jun 14, 2019 1:07 pm

Where to put /file

Sat May 07, 2022 12:07 am

Hi friends,
I know this question is somewhat ridiculous for you who know a lot about scripting, but where would I put the /file in this line:
{
:local file "XXXXXX.txt"
/file
:if ([:len [find where name=$file]] = 0) do={print file=$file; :delay 5s; set $file contents=""}

I want to learn where the /file goes within the above line




EL DONCITO
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Where to put /file  [SOLVED]

Sat May 07, 2022 3:18 pm

leave it where is it, outside the :if
:local file "XXXXXX.txt"
:if ([:len [/file find where name=$file]] = 0) do={/file print file=$file; :delay 5s; /file set $file contents=""}
 
eldoncito2019
Member
Member
Topic Author
Posts: 333
Joined: Fri Jun 14, 2019 1:07 pm

Re: Where to put /file

Sat May 07, 2022 3:48 pm

Than you REX.




EL DONCITO.

Who is online

Users browsing this forum: JDF and 24 guests