9 lines
265 B
C#
9 lines
265 B
C#
Random random = new Random();
|
|
var fileArray = Directory.GetFiles("/var/data");
|
|
string file = fileArray[random.Next(fileArray.Length)];
|
|
if (File.Exists("/var/result/data.txt"))
|
|
{
|
|
File.Delete("/var/result/data.txt");
|
|
}
|
|
File.Move(file, "/var/result/data.txt");
|