Test Data Creation – random dates of birth

I needed to generate dates of birth for some testing recently and found that this was an easy way to do it. Excel ensures that you don’t get any invalid dates (such as 31st of February, or Leap Year problems).

In this spreadsheet you enter the ages that you’d like your test data to represent, e.g 18-75, 30-40 and the spreadsheet does the rest.

Click here to download the spreadsheet.




Batch file to tidy up contents of LoadRunner script folder

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.

@echo off

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 *.idx

echo mdrv*.log

echo mdrv.txt

echo options.txt

echo *.ci

echo combined_*.c

echo output.txt

echo debug.inf

echo *.bak



echo It will then output a list of what it deleted to: –

echo [c:FilesDeleted.txt]


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

“Notepad.exe” “c:FilesDeleted.txt”

del c:FilesDeleted.txt


How to drop multiple tables in MySQL

After an experiment with a MediaWiki Wiki on my website, I decided that I preferred to use Joomla for my site content. I needed to delete the Wiki content to free up some space.

Deleting the wiki folder was easily done through FTP.
Deleting the database tables had the potential to be time consuming.
I used this SQL to find all the relevant tables and delete the WIKI tables with SQL statements.



Returned a list of tables like this….







wiki_interwiki  etc. etc.


Using a text editor (I like TextPad from Helios Software), create SQL to drop each table in the list.


drop table wiki_archive;

drop table wiki_categorylinks;

drop table wiki_externallinks;

drop table wiki_hitcounter;

drop table wiki_image;

drop table wiki_imagelinks;

drop table wiki_interwiki; etc. etc.


This deletes all the tables at once.