please help me in this way....
package Email_Crawler;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
File file = new File("C:\\abc");
if(file.isDirectory())
{
String dir = file.getAbsolutePath(); // get path
directive(dir); // call directive method
}
if(file.isFile())
{
String fil = file.getAbsolutePath();
file(fil);
}
}
public static void directive(String dir)
{
String[] list = dir.split(dir); // dir.List() does not exist, how to get the list in directive
for(int i = 0; i< dir.length() ; i++)
{
File f = new File(list[i]);
if(f.isFile())
System.out.print("File "+ i + " : " + f.getName() );
else
directive(list[i]);
}
}
public static void file(String file)
{
}
}

New Topic/Question
Reply




MultiQuote




|