This is what I have tried
string[] filestomove = new string[] {"text.txt", "never.json", "gonna.dll", "giveyou.exe", "up.png"};
string[] dirstomove = new string[] {"never gonna", "let you down", "never gonna", "run around", "and desert you"};
foreach(string filename in filestomove)
{
if(File.Exists(filename)) {
File.Copy(filename, path, true);
}
}
foreach(string dirname in dirstomove)
{
if(Directory.Exists(dirname)) {
Directory.Move(dirname, path);
}
}
However, it didnt work for me for some reason, it gave me an error. Does anyone know how to do this?
You need to specify a full path to write to: