- NO need of FTP service enable
- NO need of Firewall config
- NO need of User\Password config
- NO need external scritp
- May be easy included in other script
Code: Select all
{
:local CreateDirNewPath "NewDir/NewSubDir"
:do {
/tool fetch address=127.0.0.1 port=443 mode=https src-path="NotExist" dst-path=($CreateDirNewPath."/NotExist")
/file remove ($CreateDirNewPath."/NotExist")
} on-error={ }
}
Code: Select all
{
:local CreateDirNewPath "NewDir/NewSubDir"
:do {
/tool fetch https://127.0.0.1/NotExist dst-path=($CreateDirNewPath."/NotExist")
/file remove ($CreateDirNewPath."/NotExist")
} on-error={ }
}
This is if you not want "status:failed" in terminal.
Code: Select all
{
:execute {
:local CreateDirNewPath "NewDir/NewSubDir"
:do {
/tool fetch address=127.0.0.1 port=21 mode=ftp src-path="NotExist" dst-path=($CreateDirNewPath."/NotExist")
/file remove ($CreateDirNewPath."/NotExist")
} on-error={ }
}
}
This if you can use global variable
Code: Select all
{
:global CreateDirNewPath "NewDir/NewSubDir"
:execute {
:do {
/tool fetch address=127.0.0.1 port=21 mode=ftp src-path="NotExist" dst-path=($CreateDirNewPath."/NotExist")
/file remove ($CreateDirNewPath."/NotExist")
} on-error={ }
}
}
I suggest to Mikrotik to correct also the scritp to https://wiki.mikrotik.com/wiki/Script_t ... _directory
Best regards