mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-21 09:35:43 +02:00
22 lines
531 B
Text
22 lines
531 B
Text
|
:global CreateDirecotry do={
|
||
|
|
||
|
:global userName;
|
||
|
:global password;
|
||
|
:global directoryName;
|
||
|
:global tempFileName temp.rsc;
|
||
|
|
||
|
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;
|
||
|
|
||
|
file remove ($directoryName."/".$tempFileName);
|
||
|
file remove $tempFileName;
|
||
|
|
||
|
:log info ("New directory created - ".$directoryName)
|
||
|
|
||
|
}
|
||
|
|
||
|
$CreateDirecotry userName=UserName password=Password directoryName=DirectoryName
|
||
|
|
||
|
|