+ Reply to Thread
Results 1 to 8 of 8

Copy/Rename Multiple files in Excel

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    San Diego, Ca
    MS-Off Ver
    2013
    Posts
    6

    Red face Copy/Rename Multiple files in Excel

    Hell Everyone,
    I'm currently stuck on this VBA Code. What I'm trying to do is copy and rename files in a directory using an Excel macro. For example, C2 is the source folder and D2 is the destination folder. A2 is the old file name and b2 is the new-to-be file name. It works only for one cell. I'm trying to do this for more than 3k files. I've used ",". WHen I use ":" i get an error. how do i tell the macro to go through all sales with in a column.
    Please Login or Register  to view this content.
    Last edited by chris619; 07-08-2015 at 07:07 PM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Copy/Rename Multiple files in Excel

    Hi Chris,

    Try this (I've assumed the source and destination folders are only set once):

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    05-26-2015
    Location
    San Diego, Ca
    MS-Off Ver
    2013
    Posts
    6

    Re: Copy/Rename Multiple files in Excel

    you are my hero, thanks!!!!

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,523

    Re: Copy/Rename Multiple files in Excel

    You're welcome. If you could please mark the thread as solved it would be appreciated.

  5. #5
    Registered User
    Join Date
    12-14-2016
    Location
    mumbai
    MS-Off Ver
    2010
    Posts
    3

    Re: Copy/Rename Multiple files in Excel

    Hi, can you help me with the code where source and destination changes with the filename. Appreciate!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Copy/Rename Multiple files in Excel

    payalvj welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Registered User
    Join Date
    10-23-2017
    Location
    Philippines
    MS-Off Ver
    2016
    Posts
    2

    Re: Copy/Rename Multiple files in Excel

    got a problem saying bad filename. It was due to the filenames that contain special characters such as symbol of degree, minute and seconds. Any suggestions to resolve?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Copy/Rename Multiple files in Excel

    Quote Originally Posted by RIECODERA View Post
    got a problem saying bad filename. It was due to the filenames that contain special characters such as symbol of degree, minute and seconds. Any suggestions to resolve?
    Perhaps you missed my post #6?
    please start your own thread for this

+ 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. 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
  2. How to copy and rename files in vba by searching multiple folders for files
    By razorace in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2014, 04:21 AM
  3. Replies: 0
    Last Post: 03-04-2013, 02:37 PM
  4. Copy and rename PDF files
    By Teacher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2011, 04:54 PM
  5. Copy files from list and rename
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2011, 07:53 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