|
|
@ -22,6 +22,11 @@ public class HolaFichero { |
|
|
|
if (so.charAt(0)==Windows) { |
|
|
|
System.out.print("Windows -> "); |
|
|
|
Sis=Windows; |
|
|
|
try { |
|
|
|
new HolaFichero().CreoFicheroWindows(); |
|
|
|
}catch(IOException e) { |
|
|
|
System.out.print("Error"); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
System.out.print("Linux -> "); |
|
|
@ -32,7 +37,7 @@ public class HolaFichero { |
|
|
|
|
|
|
|
public void CreoFicheroWindows() throws IOException { |
|
|
|
System.out.println("Creando fichero en Windows ..."); |
|
|
|
File fwindows = new File("G:\\ADA\\T1.Ficheros\\CreoFicheroWindows.txt"); |
|
|
|
File fwindows = new File("C:\\Users\\yaros\\Documents\\Otros\\CreoFicheroWindows.txt"); |
|
|
|
if (!fwindows.exists()) { |
|
|
|
fwindows.createNewFile(); |
|
|
|
} |
|
|
|