BK Renamer 1.0
--------------
BK Renamer is a command-line utility that allows you to perform
mass renaming of files based on a UNIX-style regular expression.
Installation
------------
Copy the file "bkren.exe" to somewhere in the system path.
Use
---
The syntax of BK Renamer is as follows:
bkren [-s] "searchexpression" "replaceexpression"
If the "-s" (subdirectories) switch is specified, the program will
recurse and process all subdirectories along with the current
directory. If not specified, the program only processes the files
and folders in the current directory.
The "searchexpression" is a regular expression that determines
which filenames/foldernames are going to be renamed.
The "replaceexpression" is a replacement regular expression that
determines what the filenames/foldernames are changed to.
Examples
--------
bkren "(.*)\.htm" "\1.html"
(Change all files/folders in the current directory with the .htm
extension to have the .html extension.)
bkren "(.*)\.([^.]*)" "\1_backup.\2"
(Appends _backup to all filenames, but before the file extension.
For example, changes bkren.txt to bkren_backup.txt and test.html
to test_backup.html. Note that we've put quotes around each
argument. This is *required* in some situations, so it's a good
idea to use quotes if you're not sure.)
bkren -s "(.*)100(.*)" "\1303\2"
(This go through all filenames in the current directory and all
subdirectories and change all instances of "100" in these
filenames to "303". For example it would change bkren100.zip
to bkren303.zip. It would also change 100monkeys.gif to
303monkeys.gif.)
Warranty
--------
There isn't any. Make backups. Lots of them.
Contact
-------
If you do find any bugs or want to contact the author for any other
reason, please feel free to write to Bill Klein <[email]bill@orbit.org[/email]>.
Also note that the latest version of the program can always be found
at:
http://www.orbit.org/renamer/
e:\我的文档\桌面>bkren "(.*)(-)(.*\.txt)" "\1 - \3"
2-3.txt --> 2 - 3.txt
2 - 3.txt --> 2 - 3.txt
e:\我的文档\桌面>ren2 -f "(.*)(-)(.*\.txt)" "\1 - \3"
"2-3.txt" changed to "2 - 3.txt"
"2 - 3.txt" changed to "2 - 3.txt"
From Chris Lomont 2006. See www.lomont.org for updates.
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |