Problems deleting files on 2.9.27

Hi everyone,

I work for an ISP and we decided that we will offer hotspots for people. I wrote a script in python to control all the mikrotiks we have (a lot of them). There is no problem with v3.27 but I can’t seem to manage to delete the hotspot directory from v2.9.27. I tried several different ways. The only one that worked was

:set i [/file print count-only]; :while ($i > 0) do = {:set i ($i - 1); :do[/file remove $i]}

but I can not parse this command to the mikrotik (i tried parsing the command with ssh, uploading an *.auto.rsc file (wich has zero length after upload)). I really think I tried all the possibilities? Does any of you have a suggestion that would work? TIA

edit: i forgot to mention that upgrading is not an option - we don’t have the licenses necessary for this kind of upgrade and my boss won’t buy them/change all the old boards with new ones