This might help:
File fileType = new File(theFile); // declare a File type
String[] theFiles = fileType.list(); // declare a list of files as
strings
long totalSpace = 0; // initialize
for (int i = 0; i < theFiles.length; i++)
{
File aFile = new File(theFile, theFiles[i]); // new file each
time
if (aFile.isDirectory()) totalSpace += examineFiles(theFile +
"\\" + theFiles[i]);
totalSpace += aFile.length(); // add up space
}
-----Original Message-----
From: Sameer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 10:51 PM
To: [EMAIL PROTECTED]
Subject: directory info using java
hi everybody,
I need to get a list of all filenames and subfolders residing in a specific
directory because I need to make some changes in a lot of files.
Could anyone help me with a java application or applet which achieves the
above without of course changing each file individually.
thanks in anticipation,
Sameer
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html