+ Reply to Thread
Results 1 to 4 of 4

Copy Folder then rename files in new folder from list in Excel

  1. #1
    Registered User
    Join Date
    05-20-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    28

    Copy Folder then rename files in new folder from list in Excel

    Hello,

    I am attempting to copy a folder and then rename the files in the copied folder with a list derived from an excel workbook. In the excel workbook, column A contains the original name, and Column B contains the new name. Here is a snapshot of the naming "from" and "to" cells:

    2021-04-19_16-41-33.png

    This code that I have so far just copies the folder. I need to now rename the files as determined by the list given above.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Copy Folder then rename files in new folder from list in Excel

    Here is some logic found elsewhere, step thru the code and make sure that you are passing the correct "path"/ "filename" into the line that names

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-20-2020
    Location
    USA
    MS-Off Ver
    10
    Posts
    28

    Re: Copy Folder then rename files in new folder from list in Excel

    Hello,

    Thanks for your response.

    Where do I insert your code?

    I tried the code below but could not get it to work:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Copy Folder then rename files in new folder from list in Excel

    Depends when you want to rename the files..
    You can call it separately and let it rename the files based on a folder
    Or you can call the rename right after your copy line, but you would need to update the routine to accept the path and file name for it to work.

    Please Login or Register  to view this content.

+ 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. 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
  2. Replies: 18
    Last Post: 02-18-2019, 07:42 AM
  3. Rename files in folder with the list of new names
    By sajnica89bg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-09-2019, 08:12 AM
  4. [SOLVED] Select Folder and Rename Files according to list
    By mediocrerecord in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2018, 02:17 AM
  5. Rename Multiple PDF files in a folder per the list in Excel spreadsheet
    By vmanil75 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2017, 09:40 AM
  6. Copy excel and text files from one folder to another folder...
    By annupojupradeep in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 06:34 AM
  7. Replies: 0
    Last Post: 03-04-2013, 02:37 PM

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