Java - getLatest file from a different folder
Anybody know Java? I currently have this line of code:
System.out.println("The latest file in the current directory is " +
getLatest( new File(System.getProperty("user.dir") ) ) + ".");
It tells me what the last modified file in my current directory is. I would like to find out the last modified file i a different directory though. Can anybody tell me how this is done. I presume it involves changing the ("user.dir) but im not sure what it should be changed to. Just putting the path in causes an error.
|