+ Reply to Thread
Results 1 to 3 of 3

Remove last character from Name of all files in folder

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

    Remove last character from Name of all files in folder

    I have a bunch of files that were saved with a $ at the end of the extension of each file.

    For example
    DOCS_CALCED_18437_NAV 30JUN10 NAVPKG.xlsx$

    All files have a $ at the end of the file I need to be deleted

    Files are under:

    C:\\Projects\PW Protect\

    They are all formally excel files so if I manually delete the $ they open, but there are hundreds of files like this.

    What is a quick easy way to do this via VBA?

    Thanks

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Remove last character from Name of all files in folder

    I'm pretty sure this code does what you want:

    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

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

    Re: Remove last character from Name of all files in folder

    Works great! Thank you!

+ 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. Replies: 1
    Last Post: 01-28-2019, 06:55 PM
  2. [SOLVED] vba to open closed files remove filter and unhide all hiden colum of opencallsht in folder
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-25-2016, 06:33 AM
  3. [SOLVED] Macro neede to open text files from folder and remove all the lines except specific lines
    By genetist in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-07-2014, 02:44 AM
  4. Remove one line and add a number to a folder of files
    By Raury in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2014, 10:54 AM
  5. Open every file in the folder, remove merge and wrap, save and close files
    By abdesai in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2013, 04:58 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