+ Reply to Thread
Results 1 to 2 of 2

Rename files with same name

  1. #1
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Rename files with same name

    Hello.

    I've run into a small problem with my file renaming worksheet

    [Attached is a smaller example version]Items - Test.xlsm

    What my worksheet does is list files from into column E from directory shown in C4.

    From there I choose what type of file it is to be renamed in column C.

    Problem is, if in the list of files found there are two files that are similar (e.g. two driving licence files). My renaming file gives me an error 'File already exists' then ends. I'd like it to stick a (2) or (3)... at the end if there's more than one

    Note1: Changing C3 will auto run list filenames macro
    Note2: Change C4 to any directory you want (you may ignore sheet2)
    Note3: If anyone's got a better way to achieve what I'm trying to do, feel free to suggest

  2. #2
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Rename files with same name

    Here's the renaming macro
    Please Login or Register  to view this content.
    And if you change D10 to
    Please Login or Register  to view this content.
    and copy down, this will add the (2), (3) ... I think, but this means the certificate/scan must be bunched together (which may not me the case)

+ 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. 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
  2. macro to rename pdf files
    By somusas in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-25-2013, 03:13 AM
  3. [SOLVED] VBA to rename files?
    By jeff p in forum Excel General
    Replies: 2
    Last Post: 04-15-2012, 11:39 PM
  4. Rename Files from VBA
    By TonyforVBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-23-2010, 08:01 AM
  5. Rename files with VBA
    By michelle439731 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-11-2009, 12:00 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