HI All
I would like some help please on copying a folder of text files to a users choice of drive using shell explore maybe and when they select the drive and folder
it copies the text files to that location.
Kind Regards
steve
Printable View
HI All
I would like some help please on copying a folder of text files to a users choice of drive using shell explore maybe and when they select the drive and folder
it copies the text files to that location.
Kind Regards
steve
What sort of user interface would you like to use (TextBox, InputBox(), Browse For Folder, etc.) ?
@bonnie
Hi at the moment I got a command button that is creating
the text files I want to bring up
windows Explorer and choose the S: drive
Which is our server and then the user choose the folder
Within the s: drive to copy them too
Regards
Steve
Steve
If you desire, you can use the fso and two dirlistboxes instead of an explorer browser.
Example (Will need references to FSO)
The user can select the source path with Dir1, and the target path with Dir2. You would want to put in checks in case the dir (dir2) the user wants does not exist, then he she can create it with the fso as well. And as the overwrite is set to true in my example, you may want other checks as well.Code:Private Sub Command1_Click()
Dim fs As FileSystemObject
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFolder Dir1.Path, Dir2.Path, True
End Sub
The attached frmCopyFiles lets a user select text files (via an Open dialog box) that will be copied to the folder chosen through a Browse For Folder dialog box. A progress dialog box is shown while copying the files.