Actually we are all lame the problem is you are using the DIRECTORY.Move method instead of the FILE.Move method.
VB Code:
Dim sysPath As String = Environment.GetEnvironmentVariable("windir") Dim filename As String = "text.txt" IO.File.Move(IO.Path.Combine(Application.StartupPath, filename), IO.Path.Combine(sysPath, filename))
Although rename takes the same basic parameters as move so the only difference would have been to use Rename instead of Move.




Reply With Quote