批量修改文件名

VBS

 

 

function FileList(Path,fstr)
set fso=CreateObject("Scripting.FileSystemObject")
set objFolder=fso.GetFolder(Path)
Set fc = objFolder.Files

    nowPath=Path 
    for each objFile in fc
	'msgbox objFile.name
	'msgbox lcase(replace(objFile.name,fstr,""))
       oldname = nowPath &"\"& objFile.name
       newname = nowPath &"\"& lcase(replace(objFile.name,fstr,""))
	'msgbox oldname & newname
	fso.MoveFile oldname,newname 
       'name oldname  As newname 
    next
set objFolder=nothing
set fso=nothing
end function
 
msgbox "开始,可能需要一段时间"
 
FileList "E:\爱情有点蓝\爱情有点蓝2","[久久影视www.99bo.cc]"
 
msgbox "修改完成"

 

你可能感兴趣的:(影视)