I
i. Wiin
Below is my code. I'm trying to copy a log file from one location to
another as illustrated below. I'm always getting to the portion of "File
Does Not Exist". I'm running the code from a web server on \\peanuts. If I
type the "path" into Windows Explorer's address bar, then I can get the
file, so I know I have access to it...but for some reason the web page
thinks the file does not exist.
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
string path = @"\\hotdogs\WebLogs\ex040529.log";
string pathto = @"\\hotdogs\WebLogs\Old\ex040529.log";
if (File.Exists( path ))
{
File.Copy(path,pathto,true);
this.TextBox1.Text = "Copied.";
}
else
this.TextBox1.Text = "File Does Not Exist.";
}
another as illustrated below. I'm always getting to the portion of "File
Does Not Exist". I'm running the code from a web server on \\peanuts. If I
type the "path" into Windows Explorer's address bar, then I can get the
file, so I know I have access to it...but for some reason the web page
thinks the file does not exist.
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
string path = @"\\hotdogs\WebLogs\ex040529.log";
string pathto = @"\\hotdogs\WebLogs\Old\ex040529.log";
if (File.Exists( path ))
{
File.Copy(path,pathto,true);
this.TextBox1.Text = "Copied.";
}
else
this.TextBox1.Text = "File Does Not Exist.";
}