Solved

Coping Mulitiple files

Posted on 1998-10-27
1
142 Views
Last Modified: 2010-04-30
How can I copy all the files in a directory to disk a in vb
example:
copy (mydir\*.* a:\
thank you
0
Comment
Question by:sear
1 Comment
 
LVL 1

Accepted Solution

by:
jf26028 earned 20 total points
ID: 1441907
this uses the drive, directory, and file list boxes on a form.


Private Sub Command1_Click()
    Dim i As Integer
    Dim a As String
    Dim b As String
    If File1.ListCount > 0 Then                'if files in the selected dir

        For i = 0 To File1.ListCount - 1            'for all the files
           FileCopy file1.list(i), "c:\whateverdir\" & file1.list(i)
        Next                                        'continue for other files
    End If
End Sub

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question