如果你还在为一大堆刚下载的mp3改名字而发愁,那么本文对你也许会有点帮助!
我用的是Windows XP,如果你用的是Unix、Linux、Mac,没关系,只要对命令稍作修改,通吃!
1.打开功能异常强大的gVim
2.切换到目标目录
:cd E:\New Folder
3.读取目标文件名
:r!dir /B *.cpp
b.cpp
c.cpp
d.cpp
e.cpp
f.cpp
g.cpp
4.生成一批DOS命令
:%s/\(.*\).cpp/rename & \1.txt/
rename b.cpp b.txt
rename c.cpp c.txt
rename d.cpp d.txt
rename e.cpp e.txt
rename f.cpp f.txt
rename g.cpp g.txt
5.运行这些DOS命令
:%!cmd
(C) Copyright 1985-2001 Microsoft Corp.
E:\New Folder>rename a.cpp a.txt
E:\New Folder>rename b.cpp b.txt
E:\New Folder>rename c.cpp c.txt
E:\New Folder>rename d.cpp d.txt
E:\New Folder>rename e.cpp e.txt
E:\New Folder>rename f.cpp f.txt
E:\New Folder>rename g.cpp g.txt
E:\New Folder>
6.任务完成!
-------------------------------------------------------------------------------
Vim是个无比强大的Text Editor!
Unix->Linux->Windows->Mac都可以用。
只有你想不到的,没有它做不到的!