Here is a hardcoded example, True to overwrite the file, False to NOT overwrite
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\testfile.txt", "c:\test\", True
Thanks Alt...sometimes you just need to walk away from it (especially at 4AM!) I wasn't setting the FileListBox.Path to the desired directory during Form_Load(), I appreciate the response!
Yeah Lacey, the wonderful world of Peter F. Hamilton, can't wait to read the new novella, Watching Trees...
I'm trying to have a compiled app populate a FileListBox with the contents of a particular directory upon execution.
When I test/run the code within VB, the desired directory correctly populates the FileListBox, but when executing the compiled code/executable the FileListBox is populated with...
Ditto-Thanks to acecce! Found myself in the same boat as Madstu. After a couple of failed utilities, the drive was headin' to the garbage...glad I could save it.<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.