首页 > 其他 > 详细

VBS 批量修改多个文件夹下的文字命名

时间:2014-07-11 08:51:38      阅读:302      评论:0      收藏:0      [点我收藏+]

Function FilesTree(sPath) 

    Set oFso = CreateObject("Scripting.FileSystemObject"
    Set oFolder = oFso.GetFolder(sPath) 
    Set oSubFolders = oFolder.SubFolders   
    For Each oSubFolder In oSubFolders
        path=oSubFolder.Path
        name=oSubFolder.name
        Call FilesTree1(path,name)
        FilesTree(oSubFolder.Path)‘递归 
    Next
    Set oFolder = Nothing
    Set oSubFolders = Nothing
    Set oFso = Nothing
End Function
 
Function FilesTree1(sPath,sName)   
    Set oFso = CreateObject("Scripting.FileSystemObject"
    Set oFolder = oFso.GetFolder(sPath) 
    Set oSubFolders = oFolder.SubFolders 
    Set oFiles = oFolder.Files 
    For Each oFile In oFiles   
        set f=oFso.getfile(oFile.Path)
        f.name=sName&".png"
    Next 
    Set oFolder = Nothing
    Set oSubFolders = Nothing
    Set oFso = Nothing
End Function  

VBS 批量修改多个文件夹下的文字命名,布布扣,bubuko.com

VBS 批量修改多个文件夹下的文字命名

原文:http://www.cnblogs.com/jinjiangongzuoshi/p/3834641.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!