Good day. Now there is an array of source folders:
Path[] paths = new Path[4]; paths[0] = Paths.get("\\\\komp\\D$\\logs"); paths[1] = Paths.get("\\\\komp\\D$\\logs2"); paths[2] = Paths.get("\\\\komp\\D$\\logs3"); paths[3] = Paths.get("\\\\komp\\D$\\logs4"); and one recipient folder:
Path target = Paths.get("D:\\MyLogs\\"); There is a file Setting.txt, where these paths are contained line by line:
\\\\komp\\D$\\logs \\\\komp\\D$\\logs2 \\\\komp\\D$\\logs3 \\\\komp\\D$\\logs4 D:\\MyLogs Please show how to read these lines from a file and insert it into my code, so that there would be something like:
Path[] paths = new Path[4]; paths[0] = Paths.get("Первая строка из файла Setting.txt"); paths[1] = Paths.get("Вторая строка из файла Setting.txt"); paths[2] = Paths.get("Третья строка из файла Setting.txt"); paths[3] = Paths.get("Четвёртая строка из файла Setting.txt"); and one recipient folder:
Path target = Paths.get("Пятая строка из файла Setting.txt");