My.Computer.FileSystem.MoveFile("C:\Folder\File.ext", "C:\NewFolder\File.ext")
Where
"C:\Folder\File.ext"is the file to move and
"C:\NewFolder\File.ext"is the file's new location.
However, since the file being moved is the result of an OpenFileDialog I have no idea what file will be moved, but I know the directory it will be moved to.
My Code:
My.Computer.FileSystem.MoveFile(OpenFileDialog1.FileName, "C:\NewFolder\")
This will not work because I do not list the name of the file after
"C:\NewFolder\")
So, my question is: How can I move a file that is the result of an OpenFileDialog to a directory without knowing the file name and extension?

New Topic/Question
Reply




MultiQuote








|