| | |
Copy all folder contents to specified location(pls help)
Thread Solved |
Good day!.
I want to copy all the folder contents to a certain location. To be specific, i have a folder named (webproject) relative on my vb program path.When the form load, i want to copy all the content of this folder(webproject) to C:\wamp\wwww\onlineweb\.I just really dont know how to start the coding. If someone can help me to solve this problem thank you very many much
God bless on this mother earth.
I want to copy all the folder contents to a certain location. To be specific, i have a folder named (webproject) relative on my vb program path.When the form load, i want to copy all the content of this folder(webproject) to C:\wamp\wwww\onlineweb\.I just really dont know how to start the coding. If someone can help me to solve this problem thank you very many much
God bless on this mother earth.
Last edited by blocker; Mar 28th, 2009 at 7:40 am.
check this out from MS site... filecopy function
hope it helps
http://msdn.microsoft.com/en-us/libr...4y(VS.80).aspx
or this one for example on how to use filecopy...
http://www.vbforums.com/showthread.php?t=354738
hope it helps

http://msdn.microsoft.com/en-us/libr...4y(VS.80).aspx
or this one for example on how to use filecopy...
http://www.vbforums.com/showthread.php?t=354738
•
•
•
•
check this out from MS site... filecopy function
hope it helps
http://msdn.microsoft.com/en-us/libr...4y(VS.80).aspx
or this one for example on how to use filecopy...
http://www.vbforums.com/showthread.php?t=354738
I have always loved the power of API's 
This will help you...

This will help you...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Declare Function SHFileOperation Lib "shell32.dll" _ Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long '~~> Copy File/Folder Private Const FO_COPY = &H2 '~~> Does not display file names Private Const FOF_SIMPLEPROGRESS = &H100 Private Type SHFILEOPSTRUCT hWnd As Long wFunc As Long pFrom As String pTo As String fFlags As Integer fAnyOperationsAborted As Long hNameMappings As Long lpszProgressTitle As Long End Type Private Sub VBCopyFolder(ByRef strSource As String, ByRef strTarget As String) Dim op As SHFILEOPSTRUCT With op .wFunc = FO_COPY .pTo = strTarget .pFrom = strSource .fFlags = FOF_SIMPLEPROGRESS End With '~~> Perform operation SHFileOperation op End Sub Private Sub Command1_Click() '~~> Copy Folder C:\temp\1 to C:\temp\2 '~~> Change this to relevant folders Call VBCopyFolder("C:\temp\1", "C:\temp\2") End Sub
A good excercise for the Heart is to bend down and help another up...
Please Mark your Thread "Solved", if the query is solved...
==>If a post has helped you then Please Rate it!
Please Mark your Thread "Solved", if the query is solved...
==>If a post has helped you then Please Rate it!
Thank you guys. I havent try it yet. I will do this now. I know this will work.as i can look at the code. I have read thid API already. I will mark this problem solved.
Thank you very much guys again. Hope to see you all on next thread.!
God bless on this mother earth.
Thank you very much guys again. Hope to see you all on next thread.!
God bless on this mother earth.
Last edited by blocker; Mar 29th, 2009 at 9:33 pm.
![]() |
Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Searching for records contained in access from VB
- Next Thread: connect to text file database
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






