I tried this:
Dim path As String = Application.StartupPath + "\Work.xml"
Dim path2 As String = Application.StartupPath & "\SavedFiles"
File.Copy(path, path2)
But then I receive an error saying "The target file "C:\Users\User\Desktop\MyProgram\MyProgram\bin\Debug\SavedFiles" is a directory, not a file."
This way doesn't work either:
File.Copy(Application.StartupPath + "\Work.xml", Application.StartupPath + "\SavedFiles")
Any help on how to copy a single file from one directory to a new one would be greatly appreciated.

New Topic/Question
Reply



MultiQuote






|