How to reset-configuration command with script

Hi everyone, I have try to run script to reset-configuration and load config from exits backup file. But I see that don’t work. I think because when using /system rest-configuration command, the RouterOS confirm that action, like that

[admin@MikroTik] > /system reset-configuration keep-users=yes no-defaults=yes run-after-reset=flash/nhan02.rsc
Dangerous! Reset anyway? [y/N]:

How to bypass press Y to continue this action.
Thanks for your support.

I managed to bypass this prompt using ftp and automatic import
https://wiki.mikrotik.com/wiki/Manual:Configuration_Management#Automatic_Import

So my script (that contains

/system reset-configuration

was renamed to

my_script.auto.rsc

.

Once I upload using ftp it will reset without any question :slight_smile: