After you finish using LoadRunner scripts, lots of files can be left behind in the script folder, these include output files, error logs and the compiled script. Provided that you know your script works, they can be removed before you archive your scripts to save space on your file server.
I use this batch file to tidy up the files that I don’t need.
Paste the text below into a notepad.exe or a similar text editor and save it as a file called “tidyup.bat“.
Copy tidyup.bat into the script folder and run it to tidy up the files in that folder. The script uses the /s switch which means that this script recurses through all sub directories and tidies up files in script sub-folders.
After deleting files, it opens notepad.exe and displays the list of deleted files.
REM simple menu system
echo This batch file will delete the following files from every
echo folder and subdirectory from the folder in which it is run: –
echo It will then output a list of what it deleted to: –
if exist c:FilesDeleted.txt del c:FilesDeleted.txt
del *.idx /s >c:FilesDeleted.txt
del mdrv*.log /s >>c:FilesDeleted.txt
del mdrv.txt /s >>c:FilesDeleted.txt
del options.txt /s >>c:FilesDeleted.txt
del *.ci /s >>c:FilesDeleted.txt
del combined_*.c /s >>c:FilesDeleted.txt
del output.txt /s >>c:FilesDeleted.txt
del debug.inf /s >>c:FilesDeleted.txt
del *.bak /s >>c:FilesDeleted.txt