Results 1 to 5 of 5
  1. #1
    SPKO is offline Novice
    Windows XP Access 97
    Join Date
    Nov 2010
    Posts
    2

    Copy Contents


    I am trying to make an information input form. I have a bunch of users with images stored in their "my pictures" folders. I would like to have a browse button on the form where they can browse to and select the folder that all of their pictures are in. Then the feature would copy the contents of the folder and paste the contents into one main directory.

    I know there is a copyfile feature in VB, but is there a option that allows me to copy the contents of a folder and place it into a main directory?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    you can do this at least two different ways: one is through basic and the other is by using DOS commands to copy your files. If you know DOS commands, check out this small function that executes one command at a time from VB:

    http://www.ajenterprisesonline.com/_...ame=DOScommand

    also, google "computer hope" if you don't know the commands and want to use them. I have always felt that DOS in one of the best methods to get things done...better than anything that is done through the interface, including visual basic.

  3. #3
    SPKO is offline Novice
    Windows XP Access 97
    Join Date
    Nov 2010
    Posts
    2
    Well ideally I would like for the user to be able to just hit a button and browse for the folder path and have access take over from there. How would I approach it from a Visual Basics standpoint?

  4. #4
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Hi,

    you can look at the Scripting.FileSystemObject, I think it can do what you want here.

    gr
    NG

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by SPKO View Post
    How would I approach it from a Visual Basics standpoint?
    you would use the fily system object, as already stated by Noella.

    A good way to think of that method is to think of all the things you can do with your mouse when your browsing folders in the windows explorer. the file system obj. in basic does a lot of the same things, or can.

    check out the help files for those terms. there are example of code blocks to help you along the way. I would personally do it using DOS commands though. One function and less code to deal with.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Use VBA to copy table contents to the clipboard?
    By Deutz in forum Programming
    Replies: 3
    Last Post: 10-21-2010, 10:59 PM
  2. Sort Combo Box Contents
    By aputt@ssd.com in forum Programming
    Replies: 3
    Last Post: 12-03-2009, 04:47 PM
  3. Remove contents from each field
    By nancyszn in forum Access
    Replies: 7
    Last Post: 08-06-2009, 03:41 PM
  4. Updating one table with anothers contents
    By munkifisht in forum Access
    Replies: 0
    Last Post: 07-22-2009, 03:22 PM
  5. Fields and their contents
    By Ham in forum Access
    Replies: 0
    Last Post: 02-06-2009, 07:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums