ls -1aR
) and thus rename a great number of files in a convenient fashion.
Just start the script in the directory where you want to rename files. Your editor will start up, showing the file list. Directories are introduced with their names and a trailing colon. These lines, blank lines, and the lines for the current and the parent directory must not be changed. All other lines may be edited. If the --delete switch is specified, file may be deleted by emptying out their line. If you save the file and quit your editor, the script will start asking you for confirmations of the renames and deletions before performing them. If you answer with `a' (for always) at the confirmation prompt, all remaining renames and deletions will be performed unconditionally and automatically.
If the scripts detects problems with your new names (e.g., if the new names are not unique) it will abort, reporting a reason, a location of the error, and a file name. You may then try to correct your error and start over by running mvedit again and reading in the old file's contents in your editor.
Page MoveEdit |
Revision 12 Feb 2006 Parents: Index |