Link to home
Start Free TrialLog in
Avatar of sporfex
sporfex

asked on

Subfolder

Hi Experts.

How can I make a filelist with all the files including the FILES in the subfolders.I dont't want to present the subfolders itself, just the files.

Greatest Regards
Avatar of Valliappan AN
Valliappan AN
Flag of India image

Shell "command.com /c dir yourdirname /s /b /a-d > filename"

Then you could read from the file, all the files present in the directory.
Avatar of sporfex
sporfex

ASKER

I want it in a filelist box, thats my big problem...
Look at this article: you have got 3 methods to do the list of files. Check if you could use one.

http://support.microsoft.com/support/kb/articles/Q185/4/76.ASP
Avatar of Ryan Chong
Hi, as i know, filelist box only can show its parent path's files.
Also, Check this link to do the filling to filelistbox:

http://www.vbexplorer.com/vbs_fd.asp
"Get all the matching files in the directory structure."

Cheers

ASKER CERTIFIED SOLUTION
Avatar of sombell
sombell

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I look into ryansys statement.

From MSDN:
A FileListBox control locates and lists files in the directory specified by the Path property at run time.Use this control to display a list of files selected by file type. You can create dialog boxes in your application that, for example, enable the user to select a file or group of files.

So, may be, you could use some other controls, a listbox, or maybe a ListView as sombell has suggested.

The MS link that I have provided already, lists of the possible methods, API, Built-In Vb functions and FSO.
Avatar of sporfex

ASKER

Interesting!