+ Reply to Thread
Results 1 to 2 of 2

Macro to Move Files from a Folder to Newly created folders based on value in a cell

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Macro to Move Files from a Folder to Newly created folders based on value in a cell

    Dear Friends,

    I have a set of files in a single folder (the physical file names are matching with the names mentioned in column B).

    Now, I need to move the files, which names are mentioned in column B with creating new folders in the names of column C. My data is like this:

    Please Login or Register  to view this content.
    In the above example, the files Hello1.docx, Hello5.xlsx, Hello7.pdf, Hello9.xlsx are to be moved into a new folder named "CategoryA" (i.e. 4 files to be moved). Similarly, in the folder name of "CategoryB", Hello2.docx, Hello4.xlsx, Hello6.pdf (3 files) are to be moved. And such files are to be moved and the current folder must be kept empty after its movement to relevant folders.

    I request your kind help to do this process of moving files to specific folders.
    Good friends are hard to find, harder to leave, and impossible to forget.

    acsishere.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to Move Files from a Folder to Newly created folders based on value in a cell

    Try this. Change the path of the "Main" folder to suit.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. Replies: 0
    Last Post: 08-05-2015, 11:45 PM
  2. Macro - move files to folder based on list in worksheet
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2015, 05:57 PM
  3. Macro to copy folders based on cell values to another folder
    By tdvstr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2014, 10:19 AM
  4. Copy Files from one folder to different folders based on pdf file name
    By jtammyg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2014, 11:49 AM
  5. [SOLVED] Need help opening a newly created folder and placing files into it
    By gleppelman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2013, 04:24 PM
  6. Macro for copying specific data from excel files in a folder to a newly created excel file
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 02:24 PM
  7. move files from 1 folder to another based on cell values
    By aravindhan_31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2010, 01:03 PM

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