How can i get the file list of the current directory 
Author Message
 How can i get the file list of the current directory

How can i get the file list of the current directory
include the subdirectory like : dir *.*/s

i trying the following but ? :
string mcurrentD = Directory.GetCurrentDirectory();
string [] subDirectory = Directory.GetFiles
(mcurrentD,"*.*/s");



Sat, 23 Oct 2004 17:10:30 GMT  
 How can i get the file list of the current directory
Yosi,

    You will have to do this yourself.  Basically, you will have to get all
the files using the GetFiles method.  Once you have that, you will have to
get all the directories, using the GetDirectories method.  Then, in each of
those, you will have to get all the files in those directories, and so on,
and so on, until there are no files and directories left.

    Hope this helps.

--
               - Nicholas Paldino [.NET MVP]


Quote:
> How can i get the file list of the current directory
> include the subdirectory like : dir *.*/s

> i trying the following but ? :
> string mcurrentD = Directory.GetCurrentDirectory();
> string [] subDirectory = Directory.GetFiles
> (mcurrentD,"*.*/s");



Sat, 23 Oct 2004 21:01:28 GMT  
 How can i get the file list of the current directory
Is there anyway to get file list from Server in C#?

Like API functions of FtpFindFirstFile and InternetFindNextFile.

Jason


Quote:
> Yosi,

>     You will have to do this yourself.  Basically, you will have to get all
> the files using the GetFiles method.  Once you have that, you will have to
> get all the directories, using the GetDirectories method.  Then, in each of
> those, you will have to get all the files in those directories, and so on,
> and so on, until there are no files and directories left.

>     Hope this helps.

> --
>                - Nicholas Paldino [.NET MVP]



> > How can i get the file list of the current directory
> > include the subdirectory like : dir *.*/s

> > i trying the following but ? :
> > string mcurrentD = Directory.GetCurrentDirectory();
> > string [] subDirectory = Directory.GetFiles
> > (mcurrentD,"*.*/s");



Mon, 25 Oct 2004 04:32:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing current directory and getting directory name

2. File listing for current directory under Unix?

3. Getting Directory and File Lists

4. Getting a file listing from a directory

5. Getting files list of directory

6. Getting current (stored not executed) directory

7. getting current directory

8. Getting the current directory of the executable?

9. Getting Current directory of exefile

10. Getting the current working directory of my app

11. Getting and Setting Current Directory

 

 
Powered by phpBB® Forum Software