FileCopy

  • Thread starter Thread starter Lou
  • Start date Start date
L

Lou

I have a file name witha wildcard:
"D:\myFolder\Logo1.*tga"
There are 50 files that match this wilcard.
I want to copy these 50 files to another directory

I Tried
FileCopy("D:\myFolder\Logo1.*tga","D:\TargetDir")

but that didnt work?

any ideas..
-Louie
 
Lou said:
I have a file name witha wildcard:
"D:\myFolder\Logo1.*tga"
There are 50 files that match this wilcard.
I want to copy these 50 files to another directory

I Tried
FileCopy("D:\myFolder\Logo1.*tga","D:\TargetDir")

but that didnt work?

any ideas..
-Louie

I believe you need to loop through and copy each one.

This code should help.
http://www.vbcity.com/forums/faq.asp?fid=15&cat=System&#TID19980

or this one:
http://www.bubble-media.com/cgi-bin/articles/archives/000026.html

Google is our friend....
 
That only copies directories(All files) not individual files based on a
wildcard match???
 
Lou said:
I have a file name witha wildcard:
"D:\myFolder\Logo1.*tga"
There are 50 files that match this wilcard.
I want to copy these 50 files to another directory

I Tried
FileCopy("D:\myFolder\Logo1.*tga","D:\TargetDir")


\\\
For Each FileName As String In Directory.GetFiles(..., "*.tga")
FileCopy(...)
Next FileName
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top