public static void main(String [] args)
{
File f=new File("C:");
File [] fl=f.listFiles();
for(int i=0;i<fl.length;i++)
{
if (fi[i].isDirectory())
{
system.out.println("["+fl[i].getName+"]");
}
else
{
system.out.println(fl[i].getName());
}
}
}
时间: 2024-09-29 18:30:43