The testcases are ordered alfabetically, to my knowledge it is not possible to change to another ordering at execution time.
With 1000+ testcases, it would work if your filenames for the first 999 contained leading zeroes. Eg. TC0001 Title Validation.tst
If this is a one time conversion (meaning each new testcase will be compliant with this naming convention) then...
Notepad++ has a feature to do regex search and replace and to do "block" copy and paste which makes it fairly straightforward to create a batch file with statements like:
RENAME "TC1 Title Validation.tst" "TC0001 Title Validation.tst"
RENAME "TC2 Forname Validation.tst" "TC0002 Forname Validation.tst"
RENAME "TC3 Surname Validation.tst" "TC0001 Surname Validation.tst"
First of all, copy the content of your Tests directory into a backup so you can always recover.
Start with a statement to capture a list of your current testnames: DIR /B > file1
Load file1 in Notepad++
Copy and paste the content of file1 into a new document which we call file2
In file1:
Transform each line from
TC1 Title Validation.tst
into
RENAME "TC1 Title Validation.tst"
By running a search and replace (all)
Search: ^
Replace: RENAME "
and
Search : $
Replace: "
In file2:
Transform each line from
TC1 Title Validation.tst
into
"TC0001 Title Validation.tst"
By running a search and replace (all)
Search: "TC([1-9]) "
Replace: "TC000${1} "
(In Notepad++ the search and replace strings have NO QUOTES, I have put them here to make it clear there is one space at the end of this string)
and
Search: "TC([1-9][0-9]) "
Replace: "TC00${1} "
and
Search: "TC([1-9][0-9][0-9]) "
Replace: "TC0${1} "
and
Search: ^
Replace: "
and
Search : $
Replace: "
Now you are ready to create the batch file by copy/past the content of file1 into a new file3
Go to file2 and do a BLOCK COPY of all filenames (make sure you have the longest lines completely in the block)
Go to file3, position yourself on the first line and make sure you position yourself in a column beyound the longest linein this file. Now paste the block. Save and run the batch file. (Obviously after doing a quick check of the statements)
Good luck,
Danny