Java code to list files in Windows O/S by FIFO sequence

Hi,

I am new to java and working on a project which needs to list files from Windows O/S by FIFO sequence.

Here is the scenario,

One of the application logs/stores files in Windows System. After that files has to be moved to another files system on AS/400 by FIFO sequence.

I need to write java program to list files in Windows (by FIFO) and then move to different application running on AS/400.

I am using java.io.File class and method list() and could able to list all files. But, not able to list files by FIFO sequence.

I would appreciate to receive any thoughts implementing FIFO for listing files using java.

Thanks,

Siva

[683 byte] By [Siva_VSa] at [2007-11-27 3:36:07]
# 1
Put all File objects in a list, then sort with a custom comparator. Kaj
kajbja at 2007-7-12 8:39:20 > top of Java-index,Java Essentials,New To Java...
# 2
Hi Kaj,Thanks for your reply.Can you please describe more in detail or any code sample would be greatly apprecaited.Thanks,Siva
Siva_VSa at 2007-7-12 8:39:20 > top of Java-index,Java Essentials,New To Java...
# 3

Sun's Java Tutorial has examples of reading files here:

http://java.sun.com/docs/books/tutorial/essential/io/file.html

You can read about creating Lists here:

http://java.sun.com/docs/books/tutorial/collections/interfaces/index.html

And sorting the list is explained and exampled here:

http://java.sun.com/docs/books/tutorial/collections/interfaces/order.html

ChuckBinga at 2007-7-12 8:39:20 > top of Java-index,Java Essentials,New To Java...
# 4
Thank you very much for the link details.I will post my feedback soon.Thanks,Siva
Siva_VSa at 2007-7-12 8:39:20 > top of Java-index,Java Essentials,New To Java...