Friday, 9 August 2013

IOS Tip: How to Move Directories within IOS Flash Memory

Have you ever uploaded a directory to Router Flash Memory (e.g. CME GUI Dir) and found that it was uploaded to wrong path? How to move it back to right path?

Let's consider a directory named CME9.1.0GUI. I wanted to upload it to "flash0:/" however, I discovered that its uploaded to "flash0:phone_loads/".

One option to put it back in the right path is to delete the directory from the wrong path and re-upload it. This can be easy when uploading from LAN or small directories over WAN. But not for big directories over WAN.

Another option is to use "rename" command. When you rename the directory, it will ask for the destination path of the renamed directory. This means that "rename" command is doing two functions which are copying the directory to new path and renaming it.

2951-router#rename flash0:phone_loads/CME9.1.0GUI flash0:CME9.1.0GUI        
Destination filename [CME9.1.0GUI]?

Directory of flash0:/

    1  -rw-    89934456  May 28 2013 22:07:24 +07:00  c2951-universalk9-mz.SPA.152-4.M3.bin
    2  -rw-        3064  May 28 2013 22:17:54 +07:00  cpconfig-29xx.cfg
  240  drw-           0   Aug 9 2013 04:34:26 +07:00  phone_loads
    3  drw-           0  May 28 2013 22:18:12 +07:00  ccpexp
  239  -rw-        2464  May 28 2013 22:19:54 +07:00  home.shtml
  241  drw-           0   Aug 9 2013 04:34:58 +07:00  ringtones
  242  drw-           0   Aug 9 2013 04:35:46 +07:00  CME9.1.0GUI
  246  -rw-      496521   Aug 9 2013 05:04:12 +07:00

PS: This is applicable for any memory in IOS not only Flash.


  1. Thank you for this sharing I was thinking to get some post on Cisco ip phones and here I go one with which I can show any of my friends. Thank you for sharing this.