I have this code to move a file:
string path = "C:\inetpub\beGoodToo\videofolder\nome.mp4";
string path2 = "\"C:\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.7.3\content\videostreaming\nome.mp4\"";
// Garantir que existe na origem
if (!System.IO.File.Exists(path))
{
// Garantir que não existe no destino.
if (System.IO.File.Exists(path2))
System.IO.File.Delete(path2);
// Mover ficheiro.
System.IO.File.Move(path, path2);
}
The program runs fine up to the command Move
and gives the exception of the title. How can not make exception in previous commands (since the path is always the same during the process)? Is it some permission that will not allow me to move?
I'm going to move from an inetpub directory to a folder in Program Files (x86).