I cannot find a file copy utility in VB 2008(VB.Net)
it would be the equivilant to:
SHFileOperation in VB 6
Printable View
I cannot find a file copy utility in VB 2008(VB.Net)
it would be the equivilant to:
SHFileOperation in VB 6
You can use one of these 2 options.
Code:IO.File.Copy("sourceFileName as String", "destinationFileName as String")
Code:My.Computer.FileSystem.CopyFile("sourceFileName as string", "destinationFileName as String")
Easiest wway to find stuff is to search the help files/msdn online or search the object browser. ;)
Quote:
Originally Posted by Rykler
can you give me an example of how to specify the files & folders?
If you want the user to select the source and destination paths then you would use an OpenFileDialog and SaveFileDialog respectively.
no, it is only for program use, not a user feature in my App.
Then what more do you need? RonR has already shown you where to specify the source and destination paths. I assume you know what a file path looks like. If you need to specify paths relative to some specific folder then you'd need to let us know what folder that is. That said, you might want to take a look at Application.StartupPath, Environment.GetFolderPath and My.Computer.FileSystem.SpecialDirectories.