+ Reply to Thread
Results 1 to 3 of 3

How to put Prefix in filenames on all files in folder with Modified Date

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Thumbs up How to put Prefix in filenames on all files in folder with Modified Date

    Hi all

    i wanted to put a prefix on all files in a folder with the files Modified Date.

    How can i do it with Excel VBA?

    Before
    Filename
    11131101.xls
    11131102.xls

    Modified Date
    11/1/2013 7:54PM
    11/2/2013 7:46AM

    After
    Filename
    0111131954-11131101.xls
    0211130746-11131102.xls

    Modified Date
    11/1/2013 7:54PM
    11/2/2013 7:46AM

    format of the PREFIX ddmmyyHM-

    Actual View:
    below are the Before and After of the filename structure i wanted to get.
    Before
    before.jpg
    After
    after.jpg

    Thanks in advance for all the help

    BTW: i'm using Excel 2003

    jun
    Last edited by junmishima; 12-26-2013 at 08:47 PM. Reason: add "How to" in title

  2. #2
    Registered User
    Join Date
    02-15-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to put Prefix in filenames on all files in folder with Modified Date

    ok.. i did a little bit of modification based on this code that i find..

    Add Date as Suffix

    Please Login or Register  to view this content.
    but every time i run the above code i receive an error

    "Run time error = 53
    File Not Found"

    and Debug it stop at the replace process..
    the file indeed existed in a folder.

    can anyone advise what is wrong?
    p/s: i used this to get information for the GetDetailsOf GetDetailsOf infor
    thanks
    Last edited by junmishima; 12-23-2013 at 12:38 AM.

  3. #3
    Registered User
    Join Date
    02-15-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Thumbs up Re: How to put Prefix in filenames on all files in folder with Modified Date

    It seems after posting in here i got really motivated and pushed myself to try to find the solution and i DID

    with the help of Mr Google i manage to find something similar as what i wanted and get it to work.

    here is my codes which i modified from the 2 reference links below this reply:

    Please Login or Register  to view this content.
    it seems to work for me, so hope that it will helps someone else along the way.

    Noted that the code above i modified from the reference below to fit my needs..

    Rename Files in Directory

    Folder Selection Dialog Box

    FileDateTime Syntax

    and i think i'll "SOLVED" this thread

+ 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. open the newest excel file in a folder based on modified date
    By dulitul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2013, 12:52 PM
  2. Adding prefix to column of filenames
    By uglyduck in forum Excel General
    Replies: 4
    Last Post: 02-05-2010, 09:48 AM
  3. Get filenames from selected folder
    By cjconnor24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2009, 07:31 AM
  4. [SOLVED] List Filenames from Folder
    By Eskimo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2006, 03:45 PM
  5. [SOLVED] Look for a string in filenames in a folder?
    By FrigidDigit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2005, 12:06 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