Listing Directories and FIles 
Author Message
 Listing Directories and FIles

Hello

I am working on an app that kinda looks like an FTP program. I want to have
a list of all files in a directory on the LHS, so that I can select certain
ones then when I click a command button, the seleted files then show up in a
list on the RHS (I am then going to do some operations using the file names
from the RHS).

I am not sure what control to use in VB.NET to get the list of files in a
dir, so that it will be used in this way.

Anyone have any suggestions?



Tue, 12 Oct 2004 01:30:51 GMT  
 Listing Directories and FIles

Quote:
> I am not sure what control to use in VB.NET to get the list of files
> in a dir, so that it will be used in this way.

Look up "DirectoryInfo" in the online help.

HTH
--
Viele Gr?e,
Mirko

PGP-Key http://www.walter-edv.de/PGPprivat.asc



Tue, 12 Oct 2004 03:46:54 GMT  
 Listing Directories and FIles
Is there a simplier way? I looked through the help, but I can't seem to
figure out how exactly to implement this method.



Quote:

> > I am not sure what control to use in VB.NET to get the list of files
> > in a dir, so that it will be used in this way.

> Look up "DirectoryInfo" in the online help.

> HTH
> --
> Viele Gr?e,
> Mirko

> PGP-Key http://www.walter-edv.de/PGPprivat.asc



Tue, 12 Oct 2004 10:57:50 GMT  
 Listing Directories and FIles

Quote:
> Is there a simplier way? I looked through the help, but I can't seem to
> figure out how exactly to implement this method.

This _is_ quite simple. Would you prefer using winapi?

Dim sFile As String()
sFile = System.IO.Directory.GetFiles("C:\WINDOWS", "*.*")
For Each sF In sFile
   ' Filename in sF
Next

HTH
--
Viele Gr?e,
Mirko

PGP-Key http://www.walter-edv.de/PGPprivat.asc



Tue, 12 Oct 2004 20:25:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Selecting files in many directories, use of file list box

2. Directory Listing of files to include files in the subdirectories

3. directories and sub-directories in the list

4. Help: displaying hidden directories in directory list box

5. directories and sub-directories in to a list

6. Listing Files/Directories

7. List of files in directories

8. List Directories to a File Macro Help

9. Macro to list the files in a directory?

10. Printing a Directory of Files List

11. List-Box for Files/Directory in Word-VBA

12. List-Box for Files/Directory in Word-VBA

 

 
Powered by phpBB® Forum Software