mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-26 19:58:41 +02:00
Initial Commit. RouterOS_Create_Direcotry script
This commit is contained in:
parent
789c19dacf
commit
383eada1a9
1 changed files with 21 additions and 0 deletions
21
RouterOS_Create_Directory.rsc
Normal file
21
RouterOS_Create_Directory.rsc
Normal file
|
@ -0,0 +1,21 @@
|
|||
: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
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue