zoukankan      html  css  js  c++  java
  • 【性能测试】:关于清除脚本中的垃圾文件的方法

    开发出来的LR脚本,执行次数多了,就会包含非常多的中间文件,占地方,所以有时需要清除掉

    可以写一个简单的脚本,清理掉这些文件,脚本内容如下:

    echo off
    cls
    echo.
    echo.
    echo  This batch file will delete the following files from every 
    echo  folder and subdirectory from the folder in which it is run: 
    echo.  
    echo  *.idx
    echo  mdrv*.log
    echo  mdrv.txt
    echo  options.txt
    echo  *.ci
    echo  combined_*.c
    echo  output.txt
    echo  debug.inf
    echo  *.bak
    echo  
    esult1
    echo.
    echo.
    if exist %temp%FilesDeleted.txt del %temp%FilesDeleted.txt
    del *.idx /s >%temp%FilesDeleted.txt
    del mdrv*.log /s >>%temp%FilesDeleted.txt
    del mdrv.txt /s >>%temp%FilesDeleted.txt
    del options.txt /s >>%temp%FilesDeleted.txt
    del *.ci /s >>%temp%FilesDeleted.txt
    del combined_*.c /s >>%temp%FilesDeleted.txt
    del output.txt /s >>%temp%FilesDeleted.txt
    del debug.inf /s >>%temp%FilesDeleted.txt
    del *.bak /s >>%temp%FilesDeleted.txt
    rd result1 /s /q
    "Notepad.exe" "%temp%FilesDeleted.txt"
    del %temp%FilesDeleted.txt

    将脚本保存为bat格式的,放在我们开发的脚本目录下,点击执行以下就行了

    注意:清除脚本中的路径为当前路径,删除的文件是当前路径下的符合格式的文件,不要放错了路径,一不小心,把不该删除的删除了,那就后悔啦

  • 相关阅读:
    常用性能测试工具和命令汇总
    delphi try except语句 和 try finally语句用法以及区别
    delphi中 ExecSQL 与 open
    Javascript闭包
    遍历一个List的几种方法
    IDEA导入项目jar包红线、依赖问题....
    HashMap、Hashtable、ConcurrentHashMap的原理与区别
    记一次CPU飙升BUG
    创建单链表
    【剑指offer】题目二
  • 原文地址:https://www.cnblogs.com/fy--/p/8891205.html
Copyright © 2011-2022 走看看