Getting a file list based on creation date/time 
Author Message
 Getting a file list based on creation date/time

I have an application that has to pick up files that are posted to a
directory. These files have to be handled on a first come, first serve
basis. I would therefore like to continuously loop through the directory, to
always pick up the file with the earliest creation date (after processing it
is moved from the directory).
I can not seem to find an efficient method of doing this. I would like to
use something like FindFirstFile and FindNextFile however those api's search
alpahbetically.
Does anyone have any ideas of how I can do this?

Thanks in advance.

Shoshana



Sun, 27 Jul 2003 23:31:54 GMT  
 Getting a file list based on creation date/time

Quote:

>I have an application that has to pick up files that are posted to a
>directory. These files have to be handled on a first come, first serve
>basis. I would therefore like to continuously loop through the directory,
to
>always pick up the file with the earliest creation date (after processing
it
>is moved from the directory).
>I can not seem to find an efficient method of doing this. I would like to
>use something like FindFirstFile and FindNextFile however those api's
search
>alpahbetically.

Not precisely. FindFirstFile/FindNextFile do not
have a defined order in which files are returned.

They come back alphabetically from an NTFS volume
because of how NT stores directory information,
but it's still undefined.

Your best bet is to buffer all file names, and sort
manually.



Sun, 27 Jul 2003 23:48:55 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting directory creation date and time???

2. Getting file creation dates from ifstream.

3. File Creation Date/Time Stamp

4. File Creation Date/Time

5. QUESTION: How to set the time and date for a file's creation or modification

6. getting the creation date of dir?

7. getting hard disk creation date

8. C time/date to Visual Basic time/date

9. Date Time Picker - Date AND Time

10. Checking file creation/modification dates

11. File Creation Date

12. Get file Creation Date

 

 
Powered by phpBB® Forum Software