zoukankan      html  css  js  c++  java
  • vbs,修改文件名

    一次性能测试记录,因为项目要批量上传文件,奈何文件有50 * 2个,然后系统效验文件名,要不停地修改,找了一些资料整理脚本如下:

    strFolder = "\xxxx2018198_数据文件HH"
    Dim name1,name2 '-------------------------输入要修改的文件名-------------------------------------------- 'name1 原文件名 'name2 要修改的文件名 name1 ="20180919001" name2 ="20180920001" '-------------------------输入要修改的文件名-------------------------------------------- Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(strFolder) Set colFiles = objFolder.Files For Each strFile in colFiles If Lcase(objFSO.GetExtensionName(strFile)) = "txt" Then strNewName = Replace(strFile.Name, name1, name2) objFSO.MoveFile strFile, strFolder & "" & strNewName End If Next For Each strFile in colFiles If Lcase(objFSO.GetExtensionName(strFile)) = "flag" Then strNewName = Replace(strFile.Name, name1, name2) objFSO.MoveFile strFile, strFolder & "" & strNewName End If Next 'MsgBox "修改完成!"
     

    转载于:https://www.cnblogs.com/abcd19880817/p/9697829.html

  • 相关阅读:
    热更新--动态加载framework
    封装framework注意点
    zip压缩和解压缩
    iOS 网络请求数据缓存
    tomcat服务器访问网址组成
    iOS--支付宝环境集成
    线程10--NSOperation的基本操作
    线程9--NSOperation
    线程8--GCD常见用法
    线程7--GCD的基本使用
  • 原文地址:https://www.cnblogs.com/lnd-blog/p/12445427.html
Copyright © 2011-2022 走看看