Look into the DOS "dir" command by going to a command prompt and typing "dir /?" and pressing return. It will tell you all the options available to you with that command. To make the first step easy for you, the command string you need to construct is the following:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">dir <Drive:\path> /a:-D /o /T:C</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">If you are only interested in the name of the files and not any other information, you can add the "/b" switch to the end of that command string and it will only show you the file names.
Then the steps you'll need to code if you want to have WinRunner gain access to this information (as I assume this is the case since this query was posted in this forum), you will then need to design your script code to:
</font><ul type="square">[*]<font size="2" face="Verdana, Arial, Helvetica">perform the dos_system() command corresponding to the drive you want information from, piping it into a txt file.....</font>[*]<font size="2" face="Verdana, Arial, Helvetica">Open the file in WinRunner and read the information in line by line using the file_*() functions. (use array to pull in all at once, or a while() loop if you want to deal with each file in turn)</font>[/list]<font size="2" face="Verdana, Arial, Helvetica">
Insanity: doing the same thing over and over again and expecting different results