Spoiler
I dont know if that is right but i think it is.
Please can someone help me
Thanks
Liam




Posted 11 May 2010 - 09:23 AM
' Declare a variable named theFolderBrowser of type FolderBrowserDialog.
Dim theFolderBrowser As New FolderBrowserDialog
' Set theFolderBrowser object's Description property to
' give the user instructions.
theFolderBrowser.Description = "Please choose the directory where you want the Patch files installed to."
' Set theFolderBrowser object's ShowNewFolder property to false when
' the a FolderBrowserDialog is to be used only for selecting an existing folder.
theFolderBrowser.ShowNewFolderButton = True
' Optionally set the RootFolder and SelectedPath properties to
' control which folder will be selected when browsing begings
' and to make it the selected folder.
' For this example start browsing in the Desktop folder.
theFolderBrowser.RootFolder = System.Environment.SpecialFolder.Desktop
' Default theFolderBrowserDialog object's SelectedPath property to the path to the Desktop folder.
theFolderBrowser.SelectedPath = My.Computer.FileSystem.SpecialDirectories.Desktop
' If the user clicks theFolderBrowser's OK button..
If theFolderBrowser.ShowDialog = Windows.Forms.DialogResult.OK Then
' Set the FolderChoiceTextBox's Text to theFolderBrowserDialog's
' SelectedPath property.
Dim FSO
FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile("C:\Documents and Settings\Liam\Desktop\v2.0 (W.O Verification)\PatchHelperFiles\PatchHelperCL.txt", "USER SPECIFIED DIRECTORY HERE") ' is this right? if now how would i do it?
End If
Posted 11 May 2010 - 09:24 AM
Posted 11 May 2010 - 10:12 AM
Imports System.IO 'at the top
Dim fbd As New FolderBrowserDialog
'set your properties
If fbd.ShowDialog() = DialogResult.OK Then
Dim destDir As New DirectoryInfo(fbd.SelectedPath)
Dim sourceDir As New DirectoryInfo("C:\Documents and Settings\Liam\Desktop\v2.0 (W.O Verification)\PatchHelperFiles\")
For Each file As FileInfo In sourceDir.GetFiles
file.CopyTo(Path.Combine(destDir.FullName, file.Name))
Next
End If
Posted 11 May 2010 - 10:44 AM
hawkvalley1, on 11 May 2010 - 09:12 AM, said:
Imports System.IO 'at the top
Dim fbd As New FolderBrowserDialog
'set your properties
If fbd.ShowDialog() = DialogResult.OK Then
Dim destDir As New DirectoryInfo(fbd.SelectedPath)
Dim sourceDir As New DirectoryInfo("C:\Documents and Settings\Liam\Desktop\v2.0 (W.O Verification)\PatchHelperFiles\")
For Each file As FileInfo In sourceDir.GetFiles
file.CopyTo(Path.Combine(destDir.FullName, file.Name))
Next
End If
Posted 11 May 2010 - 11:23 AM
Posted 11 May 2010 - 12:21 PM
hawkvalley1, on 11 May 2010 - 11:18 AM, said:
Posted 11 May 2010 - 01:09 PM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
