graviz
Registered User.
- Local time
- Today, 16:35
- Joined
- Aug 4, 2009
- Messages
- 167
I've been trying to search for all picture files in my documents and copy them to a folder on the desktop. I found this below and it work great for searching however I'm having trouble getting the copy to work.
http://www.ammara.com/access_image_faq/recursive_folder_search.html
I replaced the debug.print vfile with my copy function. I've tried copyfile but it needs to specify the destination with the file name. I tried using the FSO filecopy method and can't get it to work (keep getting a compile error "Expected =") I feel the hard part is done and this part should be simple. Any ideas?
http://www.ammara.com/access_image_faq/recursive_folder_search.html
Code:
[COLOR=#000080]Dim[/COLOR] colFiles [COLOR=#000080]As New[/COLOR] Collection
RecursiveDir colFiles, "C:\Photos", "*.jpg", [COLOR=#000080]True[/COLOR]
[COLOR=#000080]Dim[/COLOR] vFile [COLOR=#000080]As Variant[/COLOR]
[COLOR=#000080]For Each[/COLOR] vFile [COLOR=#000080]In[/COLOR] colFiles
[COLOR=#000080]Debug.Print[/COLOR] vFile
[COLOR=#000080]Next[/COLOR] vFile[/FONT]
[FONT=Courier New]
I replaced the debug.print vfile with my copy function. I've tried copyfile but it needs to specify the destination with the file name. I tried using the FSO filecopy method and can't get it to work (keep getting a compile error "Expected =") I feel the hard part is done and this part should be simple. Any ideas?