I am looking to rename all directories on a certain hard drive (not C:) by capitalising the first letter of every directory (so: \images -> \Images). Unfortunately I have not enough experience to write this from scratch.
|
|
The following native batch script will rename all directories in drive X:, ignoring read only, hidden, and system directories and ignoring reparse points. It converts the names to lower case and then capitalizes the initial character of the directory name (English characters). It does not handle unicode in names.
The script uses a temp file for performance reasons. It could be modified to have FOR /F read the output of the DIR command directly. But the output can be quite large, and FOR /F becomes very slow if the command result set is very large. There are many tweaks that can be applied to the DIR command. For example: Remove the Remove the Remove the |
|||
|
|
|
As Martheen Cahya Paulo mentions in the comments, this question has already been answered, however indirectly. You can use a great tool, Space Tornado Renamer, as posted here: http://superuser.com/a/65304/125301, |
|||
|