| || |
opening report file which changes its name for each run
I Run a testscript which Generates a report in .xls format with a name Report0003455 which will be saved into local folder,i need to go this .xls file and find out data is matched with exactly with what i entered,if i want to generate another report for the samescript i will get another file with different name Report0003678,what i want is how can i go and open this report whose name is changing each time,i am trying ddt_open(datafile,DDT_OPEN_READ),can anyone give me solution
Re: opening report file which changes its name for each run
You can do this with a DOS Sort.
As soon as you create the file do a directory listing and pipe the output into a sort command. The sort command has an option to sort the input according to a specified column , see
so make the specified column the file creation date.
Pipe the output of the sort command into a file and read the 1st filename. That should be your file.
Your sort command should look something like
sort \+n < dir c:\sourcedir > c:\temp.