PC Review


Reply
Thread Tools Rate Thread

How can I get a list of all filenames into one text file?

 
 
Trint Smith
Guest
Posts: n/a
 
      26th Aug 2003
ok,
batch files will be written out at a certain time into one directory...i
need all of the filenames from one directory to be listed in one text
file...how can i do that??
thanks,
Trint

..Net programmer
(E-Mail Removed)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
CJ Taylor
Guest
Posts: n/a
 
      26th Aug 2003
You can use the System.Io.DirectoryInfo to get a list of files, then use a
filestream object to write out each one of their names.


"Trint Smith" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ok,
> batch files will be written out at a certain time into one directory...i
> need all of the filenames from one directory to be listed in one text
> file...how can i do that??
> thanks,
> Trint
>
> Net programmer
> (E-Mail Removed)
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      26th Aug 2003
Hello,

"Trint Smith" <(E-Mail Removed)> schrieb:
> batch files will be written out at a certain time into one directory...i
> need all of the filenames from one directory to be listed in one text
> file...how can i do that??


System.IO.DirectoryInfo.GetFiles

will return an array of strings containing the file names of the files in
the directory. Have a look at the classes FileStream and StreamWriter in
the System.IO namespace for writing the data to a file.

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3.8 filenames if file select box in xp long filenames appeared in Ernie Windows XP Help 0 18th Oct 2008 05:57 AM
File list - list filenames in excel =?Utf-8?B?SlJQ?= Microsoft Excel Programming 4 19th Feb 2007 06:38 PM
List filenames in a file with full pathname =?Utf-8?B?UmVpbmhhcmQgRnJhbmtl?= Microsoft Windows 2000 CMD Promt 6 10th May 2004 06:56 PM
How to save a list of custom words in a rule to a text file, or to copy the list? Dmitriy Kopnichev Microsoft Outlook Third-Party Utilities 3 26th Jan 2004 06:15 AM
How to save a list of custom words in a rule to a text file, or to copy the list? Dmitriy Kopnichev Microsoft Outlook Discussion 3 26th Jan 2004 06:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:29 PM.