- Katılım
- 12 Eylül 2014
- Mesajlar
- 167
- Tepkime puanı
- 0
- Puanları
- 0
Kod:
[COLOR=#B5B5B5][FONT=tahoma]public static **** main(String args[]){ [/FONT][/COLOR]try{
// File (or directory) to be moved
File file = new File("file.txt");
// Destination directory
File dir = new File("gg");
// Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
if (!success) {
System.out.println("File moved");
}
}
catch (Exception ioe){
ioe.printStackTrace();
} [COLOR=#B5B5B5][FONT=tahoma]}[/FONT][/COLOR]