473,387 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

FileCopy

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
Nov 21 '05 #1
3 2291
Lou wrote:
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...stem&#TID19980

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

Google is our friend....
Nov 21 '05 #2
Lou
That only copies directories(All files) not individual files based on a
wildcard match???
"Chris" <no@spam.com> wrote in message
news:e0**************@TK2MSFTNGP15.phx.gbl...
Lou wrote:
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...stem&#TID19980

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

Google is our friend....

Nov 21 '05 #3
"Lou" <lo********@comcast.net> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Beryl Small | last post by:
I have a web application in Visual Studio.Net 2003. On the click event of a button on my .aspx page, I use the following FileCopy SourceFile, DestinationFil the Sourcefile is on a mapped drive...
2
by: deko | last post by:
I want to turn error handling off, then back on in a sub routine that backs up a select set of documents. For some reason, I can't seem to get this to work - Private Sub BackupDocs() On Error...
6
by: deko | last post by:
In a multi-user environment, I have a table that stores hyperlinks to documents that are stored on the machine that hosts the mdb database. The table entry looks like this: ...
9
by: cantelow | last post by:
Hi. I've got a program printing multiple pdf reports, and I need to wait for completion of various associated operations- The pdf printer prints to one file, then I need to copy that where I need...
0
by: daniele.balducci | last post by:
Hi All, I'm experiencing troubles in a simple .net web application. The applicatione is made up by a single form looping to move some files to a different folder . the main loop is as follows...
3
by: betygs | last post by:
Hi all, I´m not speak english so well, but i'll try to do it better. I have a problem with the filecopy function when i use the IP instead of a computer name. For example This sentence works ok...
4
by: =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post by:
Where can I find XP version of FILECOPY.AVI, to use in a dialog? There is a movie called FILECOPY.AVI which is included with Visual Studio 2005, but it is the 16 bit (Windows 95) version. There...
7
by: bhughes2187 | last post by:
In my app I am creating, there is a procedure that does a file copy from the local drive to a network share. The issue I am having, is even though I have the share mapped, and I can browse to the...
7
by: TracyWants2Know | last post by:
Access Version: 2002 SP3 OS: MS Windows XP Professional Code from Module: Dim txtFileNameBuES As String Dim txtFileNameBuESXP As String Dim txtPathNameBuTo As String ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.