Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.io.IOException;
- import java.nio.file.Files;
- public class Main {
- public static void main(String[] args) {
- String APPDATA = System.getenv("APPDATA");
- File data = new File(APPDATA + "\\Tess\\config.dat");
- data.delete();
- File data2 = new File(APPDATA + "\\Tess\\config.bak");
- boolean backup = data2.exists();
- if(backup) {
- try {
- Files.copy(data2.toPath(), data.toPath());
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment