mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-07-21 11:24:24 +02:00
Update
This commit is contained in:
parent
ec0478cbca
commit
1508f05bc0
7 changed files with 82 additions and 39 deletions
|
@ -1,21 +1,25 @@
|
|||
# RouterOS Function
|
||||
# Copyright (c) Grzegorz Budny
|
||||
# Creates directory in RouterOS
|
||||
|
||||
:global CreateDirecotry do={
|
||||
|
||||
:global userName;
|
||||
:global password;
|
||||
:global directoryName;
|
||||
:global tempFileName temp.rsc;
|
||||
:global userName;
|
||||
:global password;
|
||||
:global directoryName;
|
||||
:global tempFileName temp.rsc;
|
||||
|
||||
system identity export file=$tempFileName;
|
||||
/system identity export file=$tempFileName;
|
||||
/tool fetch address=127.0.0.1 src-path=$tempFileName user=$userName password=$password \
|
||||
dst-path=($directoryName."/".$tempFileName) mode=ftp port=21;
|
||||
|
||||
tool fetch address=127.0.0.1 src-path=$tempFileName user=$userName password=$password dst-path=($directoryName."/".$tempFileName) mode=ftp port=21;
|
||||
/file remove ($directoryName."/".$tempFileName);
|
||||
/file remove $tempFileName;
|
||||
|
||||
file remove ($directoryName."/".$tempFileName);
|
||||
file remove $tempFileName;
|
||||
|
||||
:log info ("New directory created - ".$directoryName)
|
||||
:log info ("New directory created - ".$directoryName);
|
||||
|
||||
}
|
||||
|
||||
$CreateDirecotry userName=UserName password=Password directoryName=DirectoryName
|
||||
$CreateDirecotry userName=UserName password=Password directoryName=DirectoryName;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue