+ Reply to Thread
Results 1 to 2 of 2

Copy Files from One Location to Another folder or directory in Excel VBA help please.

  1. #1
    Registered User
    Join Date
    10-07-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    1

    Post Copy Files from One Location to Another folder or directory in Excel VBA help please.

    I have a destination folder that has these files: PDFs, jpg, and doc, docx; the folder has different names for each file for example: TN12345678 090119, TN REQUEST 78945612, etc - basically the pretext of the file name varies, however there are always 8 numbers in the file I need.

    Currently I just have to individually type in *12345678 or * 78945612 (for example) in the search bar in order to find the individual file I need and I repeat that process 10, 20, 30+ times depending on what I need to do.

    Can someone write a VBA code so I can input just the 8 numbers I am looking for in a column in excel and copy the files from the source folder to a destination folder so I only have the files I need? Thank you in advance! This is with VBA ( Alt + F11)

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: Copy Files from One Location to Another folder or directory in Excel VBA help please.

    Try this - Assume your value is in A1 and enter the folders where indicated.

    Please Login or Register  to view this content.
    Can you work with that?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Module to copy all files from a folder and it's sub-folders into one location
    By X*DG^& in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-13-2019, 02:40 AM
  2. Copy Files from One Folder to Another Folder based on a List In Excel
    By civram1982 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2019, 06:34 AM
  3. Replies: 18
    Last Post: 02-18-2019, 07:42 AM
  4. [SOLVED] macro to copy excel files only from main directory and sub directory to a specific folder
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2019, 09:49 AM
  5. Prompt User Folder Location and Store as Directory for Creating Folders
    By kozman2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2017, 04:58 PM
  6. [SOLVED] Open excel files, copy sheet 1 to new location and close original files
    By ghostly1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2015, 11:48 AM
  7. create new folder at one location and copy photos in that folder from other location
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2014, 05:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1