+ Reply to Thread
Results 1 to 7 of 7

Transfer files from one folder to other folders

  1. #1
    Registered User
    Join Date
    02-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Transfer files from one folder to other folders

    Hi,

    I have a list of files with different file names starting with "T-" followed by sequential numbers and various text. I have also made folders starting with "T-" followed by the same sequential numbers. I would like to move these files to their corresponding folders using the "T-" and sequential numbers.

    Example of files in current folder:
    T-1_Marble
    T-2_Gold
    T-3_Ruby

    Example of new folders:
    T-1\2014_PRODUCTS
    T-2\2014_PRODUCTS
    T-3\2014_PRODUCTS

    I would like T1_Marble to be moved from the current folder to the new folder T-1 located in \H:\Products\Categories\T-1
    and T2_Gold to be moved from the current folder to the new folder T-2 located in \H:\Products\Categories\T-2
    and T3_Ruby to be moved from the current folder to the new folder T-3 located in \H:\Products\Categories\T-3

    I am a novice at this and would be grateful for your help.

    Many thanks

    Regards,

    Ann

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Transfer files from one folder to other folders

    FileSystemObject or FileCOpy
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Transfer files from one folder to other folders

    Hi..

    I am a novice at this and would be grateful for your help.
    As a novice.. you have taken on a fairly complex task.. I don't mean that in a bad way.. just that I hope you will understand the code I post and learn from it..

    Please Login or Register  to view this content.
    Last edited by apo; 09-05-2014 at 09:18 AM.

  4. #4
    Registered User
    Join Date
    02-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Transfer files from one folder to other folders

    Hi Apo,

    Many thanks - will take a while to digest and understand it. Thanks for your help.

    Regards,

    Raurie

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Transfer files from one folder to other folders

    I would do this

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Transfer files from one folder to other folders

    @ nathansav..

    ' What you want to do here.
    I could be wrong.. but I am pretty sure that's the actual part he wants to know how to do.. ?

  7. #7
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Transfer files from one folder to other folders

    ;-) sorry, you can then do operations like copy etc, and get the details of the time, like fl.copy destination path.

+ 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] counting folders / sub folder and files
    By Zealotwraith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2013, 11:12 AM
  2. Open ALL excel files on a folder, on different folders
    By ferrariako in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2013, 09:54 PM
  3. HYPERLINK all files in a folder and sub folders
    By rob.hobbs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2013, 06:25 AM
  4. Getting all sub folders and files within a folder
    By UsmanBPD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 08:13 AM
  5. dir all files in a folder and sub folders
    By Pero in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2009, 12:28 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