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

  • 相关阅读:
    vs2015驱动开发中使用RtlStringCchPrintfW()报错
    windbg双机调试配置
    修改Windows默认调试器
    kong配置service和route实现简单API代理
    konga的初步使用
    Kong Admin API — 核心对象
    Kong的API管理方式
    kong的管理UI选择-konga
    Kong 安装
    关于kong | API Gateway
  • 原文地址:https://www.cnblogs.com/lnd-blog/p/12445427.html
Copyright © 2011-2022 走看看