+ Reply to Thread
Results 1 to 6 of 6

renaming a file with wild cards

  1. #1
    Registered User
    Join Date
    03-01-2009
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    34

    Cool renaming a file with wild cards

    oldfilename = "C:\Users\Sairam\Desktop\daily\crow\abcd_05012017.txt"
    newfilename = "C:\Users\Sairam\Desktop\daily\crow\1.txt"
    Name oldfilename As newfilename

    the above is working.

    the below is not working

    oldfilename = "C:\Users\Sairam\Desktop\daily\crow\abcd_" & "*.txt"
    newfilename = "C:\Users\Sairam\Desktop\daily\crow\1.txt"
    Name oldfilename As newfilename

    how to use wildcard when renaming a file

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: renaming a file with wild cards

    Try this
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    03-01-2009
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: renaming a file with wild cards

    it is working file
    tku

    instead of renaming, can we copy this file abcd_05012017.txt to 1.txt using wild characters

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: renaming a file with wild cards

    Do you mean to keep the file abcd_05012017.txt and just copy its contents to 1.txt?

  5. #5
    Registered User
    Join Date
    03-01-2009
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: renaming a file with wild cards

    yes. simply copying to 1.txt

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: renaming a file with wild cards

    Try this code
    Please Login or Register  to view this content.
    Last edited by YasserKhalil; 01-08-2017 at 08:37 AM.

+ 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. Can I Use Wild Cards?
    By rblassit in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-16-2012, 11:50 AM
  2. Wild cards?
    By bobbych in forum Excel General
    Replies: 2
    Last Post: 05-17-2012, 07:11 AM
  3. [SOLVED] If Statement Using Wild Cards
    By Adrian M in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 09:05 PM
  4. [SOLVED] If Statement Using Wild Cards
    By Adrian M in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 09:05 AM
  5. [SOLVED] If Statement Using Wild Cards
    By Jasmine in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  6. If Statement Using Wild Cards
    By Jasmine in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. [SOLVED] If Statement Using Wild Cards
    By Jasmine in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2005, 06:05 AM
  8. Using Wild Cards
    By shellback1998 in forum Excel General
    Replies: 0
    Last Post: 03-29-2005, 03:40 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