Hi, I am having trouble using a string in a "File.Move" operation to rename a file. Here is the statement in which I load the string with a value:
if I attempt to use the string in the File.Move operation directly:
I get an error, but if I filter the value of the variable "fileName" through a text box
this operation:
works just fine. Any ideas? Any assistance that could be provided would be greatly appreciated.
Code:
fileName += ASCIIEncoding.ASCII.GetString(fileByte);
Code:
File.Move("c:\\tempname.txt", "c:\\" + fileName);
Code:
textbox1.Text = fileName;
Code:
File.Move("c:\\tempname.txt","c:\\"+textbox1.Text);
Comment