Manual:System/File: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Line 12: Line 12:
If RouterOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc.
If RouterOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc.


<pre>
[admin@dzeltenais_burkaans] /file> print
# NAME                          TYPE                        SIZE                CREATION-TIME     
0 autosupout.rif                .rif file                    357368              oct/05/2010 09:47:01
1 sample.txt                    .txt file                    230                  oct/11/2010 12:14:43
[admin@dzeltenais_burkaans] /file> set 1 contents=Hello
[admin@dzeltenais_burkaans] /file> print detail where name~"sample"
1 name="sample.txt" type=".txt file" size=5 creation-time=oct/11/2010 12:15:38 contents=Hello
[admin@dzeltenais_burkaans] /file>
</pre>


==Properties==
==Properties==

Revision as of 09:16, 11 October 2010

Version.png

Applies to RouterOS: v3, v4 +

Summary

Sub-menu level: /file


File menu shows all user space files on the router. It is possible to see and edit file content or delete file. file creation is not possible from this menu, to create files see scripting examples for workaround.

If RouterOS ".npk" package is uploaded, file menu will also show package specific information, like architecture, build date and time, etc.


[admin@dzeltenais_burkaans] /file> print 
 # NAME                          TYPE                         SIZE                 CREATION-TIME       
 0 autosupout.rif                .rif file                    357368               oct/05/2010 09:47:01
 1 sample.txt                    .txt file                    230                  oct/11/2010 12:14:43
[admin@dzeltenais_burkaans] /file> set 1 contents=Hello
[admin@dzeltenais_burkaans] /file> print detail where name~"sample"
 1 name="sample.txt" type=".txt file" size=5 creation-time=oct/11/2010 12:15:38 contents=Hello 
[admin@dzeltenais_burkaans] /file> 

Properties

Property Description
contents (string; Default: ) Actual content of the file.

Read-only properties

Property Description
creation-time (time) Time when file was created
name (string) Name of the file
package-architecture (string) Architecture that package is built for. Applies only to RouterOS ".npk" files.
package-built-time (string) Time when package was built. Applies only to RouterOS ".npk" files.
package-name (string) Name of the installable package that. Applies only to RouterOS ".npk" files.
package-version (string) version of the installable package that. Applies only to RouterOS ".npk" files.
size (integer) File size in bytes
file type (string) Type of the file. For folders file type is directory

read more