cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
526
Views
0
Helpful
1
Replies

Problems with EEM applet using cli command "dir flash:"

I'm trying to use an EEM applet to perform a "dir flash:" and then look to see if a specific file name resides in it with a regexp for for the file name but I can't seem to get th dir flash: to work.

event none

action 1.0 cli command "dir flash:"

action 2.0 puts "$_cli_result"

Then I manually run it using

event manager run appletname

I get a return of "Invalid input detected at '^' marker." where the ^ is pointing to the 2nd e in the word event.  This output is usually what happens when improper syntax is used but I don't believe I've made a mistake and in the past when an applet didn't run properly, it gave no indication to the monitor/console.  It just died.

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

You need to be enabled to look at file system details.  Try:

event none

action 1.0 cli command "enable"

action 2.0 cli command "dir flash:"

action 3.0 puts "$_cli_result"

View solution in original post

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You need to be enabled to look at file system details.  Try:

event none

action 1.0 cli command "enable"

action 2.0 cli command "dir flash:"

action 3.0 puts "$_cli_result"