Print Page | Close Window

Getting files names in a directory

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: SilkTest @ OneStopTesting
Forum Discription: SilkTest is an automation tool for testing the functionality of enterprise applications in most versions of Windows, Sun Solaris 9 & 10, and Red Hat Enterprise Linux WS 2.1 & 3.0.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=409
Printed Date: 13Mar2025 at 4:55pm


Topic: Getting files names in a directory
Posted By: jack45
Subject: Getting files names in a directory
Date Posted: 31Mar2007 at 4:00am
Hi,

I want to get names of all the files in a directory(which contains more than 1000 files).

I try to use SYS_GetDirContents() but it is taking too long, i waited for 30 minutes it is still reading.

Is there any better way to do that?

Thanks in advance.



Replies:
Posted By: jack45
Date Posted: 31Mar2007 at 4:26am
LIST OF STRING lsOutput
SYS_Execute ("Dir c:\myDirWithfiles", lsOutput)

Then parse through the lsOutput to get the filenames.



Print Page | Close Window