Community discussions

MikroTik App
 
User avatar
Sinan
Trainer
Trainer
Topic Author
Posts: 129
Joined: Tue Sep 01, 2015 7:00 am

Create a non txt file or modify the type

Tue Jun 14, 2016 1:59 pm

Hi all
Since we cant create files at mikrotik only by "file print file=name" and the result will be name.txt 
but i wanna to create file called name.html , i cant neither choose the type neither change the name ...
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Create a non txt file or modify the type

Tue Jun 14, 2016 2:47 pm

Because RouterOS scripting never had functionality to work with files.
file print file is just a workaround that you can use to make file, nothing more.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26387
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Create a non txt file or modify the type

Tue Jun 14, 2016 2:57 pm

Since you can't serve this html file from the router, there is no real difference. To serve the file, you will have to move it to another machine. So during this process, you might as well rename it. 
 
User avatar
Sinan
Trainer
Trainer
Topic Author
Posts: 129
Joined: Tue Sep 01, 2015 7:00 am

Re: Create a non txt file or modify the type

Tue Jun 14, 2016 6:00 pm

Thanx all i solve it using fetch from and to the same routerboard 
 
User avatar
Sinan
Trainer
Trainer
Topic Author
Posts: 129
Joined: Tue Sep 01, 2015 7:00 am

Re: Create a non txt file or modify the type

Tue Jun 14, 2016 6:01 pm

Because RouterOS scripting never had functionality to work with files.
file print file is just a workaround that you can use to make file, nothing more.
Yea i read about that .... so i made another workaround to solve the problem
 
User avatar
Sinan
Trainer
Trainer
Topic Author
Posts: 129
Joined: Tue Sep 01, 2015 7:00 am

Re: Create a non txt file or modify the type

Tue Jun 14, 2016 6:02 pm

Since you can't serve this html file from the router, there is no real difference. To serve the file, you will have to move it to another machine. So during this process, you might as well rename it. 
I m gonna use it to show the expiring date for the hotspot users so i m gonna use it for the same board 
 
osamaawed
just joined
Posts: 4
Joined: Sat Jun 18, 2016 12:29 am

Re: Create a non txt file or modify the type

Sat Jun 18, 2016 4:54 am

can you share it ?!
 
dfdf
newbie
Posts: 36
Joined: Wed Dec 08, 2021 3:51 pm

Re: Create a non txt file or modify the type

Thu Nov 23, 2023 1:37 am

Who is online

Users browsing this forum: Nullcaller and 16 guests