Sharing my mkdir (make directory) method

I was surprised that I could not create directorys on the local storage natively. I hate that it relies on FTP but it works.
Sharing for others.

# To reduce the security risk limit FTP to only connections from the device itself
set ftp disabled=no address=127.0.0.1/32;
# Create a user and group to grant access
/user group add name=ftp policy=ftp comment="Grants access to FTP";
/user add name=ftp_loopback group=ftp address=127.0.0.1/32 password="mypassword" comment="Used by scripts to FTP to the loopback interface to create directories";

# Now create the folder "/flash/ssh"
/tool fetch mode=ftp address=127.0.0.1 user=ftp_loopback password=mypassword src-path=doesnotexist dst-path=/flash/ssh/willnotexist;

This is an extract from a larger script that I might share later.

Following is a RouterOS trick that I use to make a directory via CLI [Terminal]

/ip smb shares add name=sharethis directory=nameit
/ip smb shares remove [find name=sharethis]

So the Trick is to create the SMB share with the name of the directory THEN remove the share
works very nicely and is quick and easy.

How hard it could be for Mikrotik to just add “mkdir” command, even if just for console…?! Done in 5 minutes or less…
This functionality have been requested for years. Having to use above methods for something so trivial and basic is just sad.

Nice one thanks mozerd I like that better than my FTP method

I have to agree r00t, it really should not need these types of hacks for basic file system management