Cisco – Suppress confirmation prompts in IOS when copying files

ciscocisco-ios

I am about to upgrade the IOS on several hundred Cisco VG224's in preparation for a CUCM upgrade.

I am attempting to streamline/automate this process as much as possible, and currently my main problem is the "confirmation" prompts that IOS gives back for the copy command. For example:

GW-TEST#copy scp://USER:PASSWORD@SERVER//path/path/vg224-i6k9s-mz.151-4.M7.bin slot0:vg224-i6k9s-mz.151-4.M7.bin
Destination filename [vg224-i6k9s-mz.151-4.M7.bin]? 
Translating "SERVER"...domain server (192.168.101.2) [OK] 
 Sending file modes: C0644 28935060 vg224-i6k9s-mz.151-4.M7.bin
!!! ::SNIP:: !!!!
28935060 bytes copied in 501.532 secs (57693 bytes/sec)

GW-TEST#

I have found the appropriate syntax to have the device not prompt me for the username or password every time.

But now, no matter what I do, it still prompts me to confirm the Destination filename [vg224-i6k9s-mz.151-4.M7.bin].

Is there a way to stop this behavior?

Best Answer

The command you're looking for is file prompt quiet.

If you change this setting in Global Configuration mode, it will suppress the confirmation alerts you're seeing and allow one line, automated file operations.

However, it is worth noting that for the most part, the confirmation prompts are there to protect your system and "CYA"... If you feed the wrong information into your file operations, you could potentially interrupt service on this device.

If you do disable the file prompts, I would make sure that one of the last steps in your script is to reset it to the default of file prompt alert.

See this Cisco PDF for more information.

Related Topic