Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » Get Files in a directory
Get Files in a directory [message #7231] Tue, 19 December 2006 06:32 Go to next message
laurice is currently offline  laurice
Messages: 22
Registered: September 2006
Promising Member
How do I get all the files in a given directory after I get the Directory string from FileSel ?

Thanks,

Kathrine
Re: Get Files in a directory [message #7237 is a reply to message #7231] Tue, 19 December 2006 10:58 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
you can use Find() method of FileSystemInfo class.
See theide sources for a reference.

[Updated on: Tue, 19 December 2006 10:59]

Report message to a moderator

Re: Get Files in a directory [message #7256 is a reply to message #7237] Tue, 19 December 2006 17:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Use FindFile.

FindFile ff(AppendFileName(mydir, "*.*"));
while(ff) {
   ... you get the name in ff.GetName() and attributes in other methods
   ff.Next();
}


FileSystemInfo is most likely a overkill here - it is useful for very specific situation as virtualisation of filesystem. Typical use is using FilSel to browse directory on some else computer connected via TCP/IP (only).

Mirek

[Updated on: Tue, 19 December 2006 17:14]

Report message to a moderator

Re: Get Files in a directory [message #7258 is a reply to message #7256] Tue, 19 December 2006 18:27 Go to previous message
zsolt is currently offline  zsolt
Messages: 693
Registered: December 2005
Location: Budapest, Hungary
Contributor
Quote:

FileSystemInfo is most likely a overkill here - it is useful for very specific situation as virtualisation of filesystem. Typical use is using FilSel to browse directory on some else computer connected via TCP/IP (only).

Huh, I didn't now that, but I use it to search for local files. Sometimes you say such amazing things about upp, that totally throws me Smile
Previous Topic: How to select a starting directory for the FileSel
Next Topic: Button OK label in SaveAs dialog
Goto Forum:
  


Current Time: Thu Mar 28 20:20:10 CET 2024

Total time taken to generate the page: 0.01262 seconds