批量修改文件名

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 "修改完成"

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章