Board index » cppbuilder » Re: Subdirectories list

Re: Subdirectories list


2007-08-04 03:37:23 PM
cppbuilder100
"LMario" < XXXX@XXXXX.COM >wrote in message
Quote
How can I save -in a strings array-, the names and creation
dates of the subdirectories (no files) inside another subdirectoriy?
The same way you do for files - via the FindFirst() and FindNext()
functions. For example:
TSearchRec sr;
if( FindFirst("c:\\folder\\*.*", faDirectory, sr) == 0 )
{
do
{
if( (sr.Name != ".") && (sr.Name != "..") )
{
// use sr.Name and sr.FindData.ftCreationTime as needed...
}
}
while( FindNext(sr) == 0 );
FindClose(sr);
}
Gambit
 
 

Re:Re: Subdirectories list

How can I save -in a strings array-, the names and creation dates of the
subdirectories (no files) inside another subdirectoriy?
I am using BDS 2006 (CBuilder}
Thanks,
Luis M. Mendoza
 

Re:Re: Subdirectories list

LMario wrote:
Quote
How can I save -in a strings array-, the names and creation dates of the
subdirectories (no files) inside another subdirectoriy?

A list would be a much better alternative to an array in this case.
 

{smallsort}