TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Adrian Birkett
date: 2004-06-12 10:57:00
subject: Re: Visual Basic File Con

Mike wrote:

>Okay!! I want to copy the entire files in a directory to another
>directory.
>
>Heres the code:
>--------------------------------------------------------------------------------
>
>Private Sub Command1_Click()    
>   MsgBox File1.FileName 
>End Sub
>
>Private Sub Dir1_Change()    
>   File1.Path = Dir1.Path
>End Sub
>
>--------------------------------------------------------------------------------
>
>
>Okay, As you can see it only shows one file name. I want it to do a
>wildcard copy. Anyone know how to do that??? (From one directory to
>another)
>
>PS and File1 is going to be invisible
>

OK, off the top of my head without any testing...

dim to_dir as string, from_dir as string, filename as string

from_dir = "c:\my_from_dir\"
to_dir = "c:\my_to_dir"

filename = dir(from_dir & "*.*")
do while filename  ""
    name from_dir & filename as to_dir & filename
    filename = dir()
    doevents
loop

or something like that anyway

Regards,

Ade
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 6/12/04 10:57:11 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.