Question Xcopy

Fibrewire

New member
Joined
Aug 10, 2009
Messages
3
Programming Experience
Beginner
folder browser dialog copy

Please help,

ive started a simple project to copy a folder from one place to another, so far i have; one folderbrowserdialog to select the source folder, and another folderbrwoserdialog to select the destination folder, i have no idea on the code to copy from one variable location to another.


" Private Sub BrowseFoldersButton_Click2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseSourceButton.Click

Dim theFolderBrowser As New FolderBrowserDialog

theFolderBrowser.Description = "Please Select The Folder Which You Would Like Backed Up."

theFolderBrowser.ShowNewFolderButton = True

theFolderBrowser.RootFolder = System.Environment.SpecialFolder.Desktop

theFolderBrowser.SelectedPath = My.Computer.FileSystem.SpecialDirectories.Desktop

If theFolderBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then

Me.FolderChoiceTextBoxSource.Text = theFolderBrowser.SelectedPath

End If

End Sub"


would it simply be something like
"Shell (CMD xcopy "Me.FolderChoiceTextBoxSource.Text" "Me.FolderChoiceTextBoxDestination.Text" /s)


Regards Fibrewire
 
Please help,

ive started a simple project to copy a folder from one place to another, so far i have; one folderbrowserdialog to select the source folder, and another folderbrwoserdialog to select the destination folder, i have no idea on the code to copy from one variable location to another.


"
Dim Source As String = Me.FolderChoiceTextBoxSource.Text
Dim Destination As String = Me.FolderChoiceTextBoxDestination.Text
"



would it simply be something like;
Shell("c:\WINDOWS\system32\cmd.exe" xcopy "Source" "Destination" /S /D /Q /Y /C, vbMinimizedNoFocus)


or am i approaching this from completely the wrong angle :confused:


Regards Fibrewire
 
VB.NET:
My.Computer.FileSystem.CopyDirectory("c:\temp\dir1", "c:\temp\dir2")
 
Back
Top