+ Reply to Thread
Results 1 to 2 of 2

Copy specific files from subfolders to new folder

  1. #1
    Registered User
    Join Date
    12-28-2016
    Location
    toronto
    MS-Off Ver
    excel 2013
    Posts
    1

    Red face Copy specific files from subfolders to new folder

    Hi all, wish you an early Happy New Year!

    I am new to using VBA, looking for help to create a macro that can copy some specific .csv files from subfolders (there are subfolders within subfolders, below is the path I need to copy the files from) to a new folder.

    Path: ..../A/B/C/D

    A: multiple folders in this level, I need to loop through all
    B: multiple folders in this level, I need to loop through all
    C: multiple folder in this level but I only need to go into 1, so C is fixed
    D: all the .csv files within C that I want to copy to a new folder on desktop

    ***Also, before I copy any .csv files to the new folder, I want to change its name from "D" to "A - B - D"***

    Your help would be greatly appreciated! Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy specific files from subfolders to new folder

    Can you provide more specifics?

    1) 2-3 completes examples of full actual path/filenames
    2) The name of the folder on the desktop we will create/copy into
    2) exact new names of the files from step #1.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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] list of subfolders in folder - without files and sub-subfolders
    By MartyZ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2022, 10:56 AM
  2. VBA that goes through all xls files in folder and subfolders
    By Acxer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2015, 09:06 AM
  3. Needs macro to copy excel files from folders, subfolders to new folder
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2014, 08:53 AM
  4. [SOLVED] Reading Excel files in folder/subfolders
    By crakter in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-21-2014, 05:48 AM
  5. Moving Files from Folder and Subfolders
    By mvinay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2014, 01:59 AM
  6. Counting files in folder including subfolders also and folder size
    By mido609 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 03:26 PM
  7. [SOLVED] copy subfolders, replace text in files and save files in copied subfolders
    By pieros in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2005, 09:05 AM

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