|
|
@ -4,15 +4,21 @@ import java.io.File; |
|
|
|
|
|
|
|
public class ActListar { |
|
|
|
public static void main(String args[]) { |
|
|
|
|
|
|
|
File archPrincip; |
|
|
|
if(args.length>0) { |
|
|
|
archPrincip = new File(args[0]); |
|
|
|
}else { |
|
|
|
archPrincip = new File("C:\\Users\\AntonioFrische\\OneDrive - ABACCO Solutions\\Pictures"); |
|
|
|
} |
|
|
|
listDirectorio(archPrincip, ""); |
|
|
|
} |
|
|
|
|
|
|
|
public static void ListDirectorio(File path, String location) { |
|
|
|
public static void listDirectorio(File path, String location) { |
|
|
|
File[] archList = path.listFiles(); |
|
|
|
for(int i = 0; i < archList.length; i++) { |
|
|
|
if(archList[i].isDirectory()) { |
|
|
|
System.out.println(location + archList[i].getName()); |
|
|
|
ListDirectorio(archList[i]," "); |
|
|
|
listDirectorio(archList[i],location+" -"); |
|
|
|
}else { |
|
|
|
System.out.println(location + archList[i].getName()); |
|
|
|
} |
|
|
|