Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. try {
  2. String sFichero = "c:\M6UF1EAC1.txt";
  3. File f = new File(sFichero);
  4. if (!f.exists()){
  5.  
  6. File[] ficheros2=new File(".").listFiles(new FileFilter() {
  7. public boolean accept(File fichero2) {
  8. return fichero2.isFile() && !fichero2.isHidden() ;
  9. }
  10. });
  11. for(File fichero :ficheros2) {
  12. System.out.print( ficheros2.length+ " ");
  13. System.out.print(fichero.getName()+" ");
  14. System.out.println(fichero.getAbsoluteFile()) ;
  15. }
  16.  
  17. } else{
  18.  
  19. System.out.println("No existe");
  20. }}
  21.  
  22. catch(Exception e) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement