Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Simple...Copying files

Posted on 1999-06-30
6
Medium Priority
?
154 Views
Last Modified: 2010-05-02
I have two file list boxes and a button.  I want to copy the selected files from one box to the other, and therefore into the other directory, but for some reason, the FileCopy command isn't working.  I am new at this so I may just be doing the syntax a bit wrong, but the online help is no help!  Thanks!
0
Comment
Question by:neymeyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
SiriusP earned 30 total points
ID: 1521181
You must refresh the filelistboxes
filelistbox1.refresh
filelistbox2.refresh
0
 

Author Comment

by:neymeyer
ID: 1521182
It still doesn't like to work with multiple file selections.  Is there other syntax for that?
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1521183
just do this:
dim inti as integer
for inti =  0 to file1.listcount
    if file1.selected(inti) then
        filecopy file1.path & "\" & file1.list(inti), file2.path & "\" & file1.list(inti)
    end if
next inti

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1521184
make that : For inti = 0 to file1.listcount - 1
0
 

Author Comment

by:neymeyer
ID: 1521185
Thanks to both of you.  That is what I needed!
0
 

Author Comment

by:neymeyer
ID: 1521186
ok....thanks again!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

705 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