+ Reply to Thread
Results 1 to 4 of 4

Delete only files with "TB" but keep latest version only

  1. #1
    Forum Contributor
    Join Date
    11-01-2012
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    109

    Delete only files with "TB" but keep latest version only

    Hi,

    I want to amend the existing code so that it only deletes files with the name "TB" anywhere in the name except the most recent file with "TB" in the name

    Code currently works to delete all files in tempfolder except the most recently modified file.

    Please Login or Register  to view this content.
    Any help would be appreciated!
    Thanks!

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete only files with "TB" but keep latest version only

    See if this works...
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-01-2012
    Location
    NJ
    MS-Off Ver
    Excel 365
    Posts
    109

    Re: Delete only files with "TB" but keep latest version only

    Works perfectly! Thank you!!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Delete only files with "TB" but keep latest version only

    You are welcome and thanks for the rep.

+ 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. [SOLVED] Delete all files in Path with "*TB*" except lastest modified date
    By mikey3580 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2017, 04:00 PM
  2. Replies: 1
    Last Post: 12-12-2014, 03:25 PM
  3. [SOLVED] Copy "csv-excel-sheet" to "xlsm-excel-workbook" in Excel2013 version.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2013, 10:26 AM
  4. How unlock or delete "locked for editing" files
    By bill.k in forum Excel General
    Replies: 0
    Last Post: 10-04-2012, 08:22 AM
  5. Excel 2007 : How to Delete Archived "tmp" files
    By bobenglish in forum Excel General
    Replies: 0
    Last Post: 01-15-2009, 12:48 PM
  6. Replies: 14
    Last Post: 06-27-2008, 08:14 PM
  7. [SOLVED] On opening Excel, 4 non ".xls" files open that I cannot delete
    By Twoheat in forum Excel General
    Replies: 2
    Last Post: 03-06-2006, 10:40 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