the following file and directory procedures are useful for compact flash memory cards formatted with a class c flash file system.
file operations
copy files
to copy the files to another location, use the copy flash: source-filename {flash: | tftp: | lex: | null: | nvram: | pram: | rcp: | system: | tftp: | xmodem: | ymodem: | running-config | startup-config} destination-filename command.
the following example shows output for copying a configuration file to the startup configuration in an internal compact flash memory card (flash:):

the following example shows output for copying a configuration file to the running configuration in an internal compact flash memory card (flash:):

display the contents of a compact flash card
to display the contents (directories and files) of a compact flash memory card formatted with a class c flash file system, use the dir flash: command.
the following example shows output for displaying the contents of a compact flash memory card with a class c flash file system:

display geometry and format information
to display the geometry and format information of a compact flash memory card formatted with a class c flash file system, use the show flash: command.
the following example shows output for displaying the geometry and format information of a compact flash memory card formatted with a class c flash file system:

delete files from compact flash memory
to delete a file from a compact flash memory card, use the delete flash: filename command.
the following example shows output for deleting a cisco ios file from a compact flash memory card:

rename a file in flash
to rename a file in a compact flash memory card, use the rename flash: original-filename flash: new-filename command.
the following example shows output for renaming a cisco ios file in an internal compact flash memory card:

display the contents of a file
to display the content of a file in a compact flash memory card, use the more flash: filename command.
the following example shows output from the more command on a compact flash memory card:

directory operations
create a new directory
to create a directory in compact flash memory, use the mkdir flash:/directory-name command.
the following example shows output for first displaying the contents of an internal compact flash memory card, and then creating a directory named config and a subdirectory named test-config:

remove a directory
to remove a directory from compact flash memory, use the rmdir flash:/directory-name command.
before you can remove a directory, remove all files and subdirectories from the directory.
the following example shows output for displaying the contents of an internal compact flash memory card, then removing the subdirectory named test-config:

enter a directory and determine which directory you are in
to enter a directory in compact flash memory, use the cd flash:/directory-name command.
to determine which directory you are in, use the pwd command.
if you enter only cd, the router will enter the default home directory, which is flash:/.
the following example shows output for the following actions:
. entering the home directory of a compact flash memory card (flash:/)
. verifying that you are in the home directory
. displaying the contents of the home directory
. entering the /config directory
. verifying that you are in the /config directory
. returning to the home directory (flash:/)
. verifying that you are in the home directory