12-18-2024 06:42 AM
Hello ,
I am new with EEM , I want to delete a file from flash with EEM , how can I do that ?
event manager applet test authorization bypass
Event timer watchdog time 30 maxrun 120
action 1.0 cli command "enable"
action 2.0 cli command "delete flash:test.txt"
Router asks ;
GW#delete flash:test.txt
Delete filename [test.txt]?
How can I send "Enter" with EEM ?
Thanks .
Solved! Go to Solution.
12-18-2024 07:29 AM - edited 12-18-2024 07:45 AM
EEM has file management capabilities
event manager applet test
event none
action 020 file delete bootflash:<filename>
12-18-2024 06:55 AM
Hello @extremum
Use the file prompt quiet command to disable the IOS confirmation mechanism that asks to confirm a user’s actions.
event manager applet test authorization bypass
event timer watchdog time 30 maxrun 120
action 1.0 cli command "enable"
action 2.0 cli command "configure terminal"
action 3.0 cli command "file prompt quiet"
action 4.0 cli command "end"
action 5.0 cli command "delete flash:test.txt"
action 6.0 cli command "configure terminal"
action 7.0 cli command "no file prompt quiet"
12-18-2024 07:22 AM
Hello ,
Tried but it still require to confirm . How do I confirm with EEM ?
quietsh run | i quiet
prompt quiet
file prompt quiet
quiet
quietdele
quietdelete bo
quietdelete bootflash:gw
quietdelete bootflash:test.txt
Delete bootflash:/test.txt? [confirm]
12-18-2024 07:29 AM - edited 12-18-2024 07:45 AM
EEM has file management capabilities
event manager applet test
event none
action 020 file delete bootflash:<filename>
12-18-2024 07:35 AM
Thanks !
12-18-2024 02:08 PM
action 2.0 cli command "delete /force /recursive flash:test.txt"
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide