+ Reply to Thread
Results 1 to 5 of 5

Renaming files after a certain character

  1. #1
    Registered User
    Join Date
    10-11-2003
    Posts
    79

    Renaming files after a certain character

    Looking for help on renaming all files in a folder where all the files after a certain character in this case below the @ and everything after it.

    2939EEBB53048_4823ASD5514SSD129605_764105619SSSDDSD3241397405_n.jpg@ERT=C36783992

    to become ...
    2939EEBB53048_4823ASD5514SSD129605_764105619SSSDDSD3241397405_n.jpg


    2WEQWEQQQ048_4823ASD55QEWE9605_76410QWQW3241397405_n.jpg@ERT=C3QW2

    to become ...
    2WEQWEQQQ048_4823ASD55QEWE9605_76410QWQW3241397405_n.jpg


    etc..

    2939EEBB53048_4823AWERREWE129605_7641WERWRER241397405_n.jpg@ERT=WEER92

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Renaming files after a certain character

    Why use excel for that? Of course it can be done by VBA - probably easiest way will to find new filename will be be to use
    Please Login or Register  to view this content.
    But I'd rather use one of free utilities like some of listed here https://marketdive.net/en/file-bulk-rename-tools-en/ and so on
    I'm using this one: https://www.nirsoft.net/utils/bulk_file_changer.html and (not affiliated) am really satisfied with results and interface (it's a bit programmers-oriented, but I like it)
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    10-11-2003
    Posts
    79

    Re: Renaming files after a certain character

    lol.. not being rude but could you imagine, where this forum would be today after 20 years if every reply was ... use this app, and that app, get this third party software.

    I have the entire script all in one, and just ran into a hiccup for dropping the text in the file names after and including @.

    I will continue to search the net for this for a few more days. including split. I have lots of old script renaming extensions, and rewording or reindexing files, just never came across needing to drop characters after a certain location.

    Thanks tho!

  4. #4
    Registered User
    Join Date
    10-11-2003
    Posts
    79

    Re: Renaming files after a certain character

    For anyone else who doesn't want to use a app or 3rd party bs...

    Please Login or Register  to view this content.
    ps thanks guy above for the line of code! was instantly helpful.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Renaming files after a certain character

    Well, I'm glad the code was usefull.

    Your comment was by no means rude, but as it appeared, I feel that I shall explain why wrote this second suggestion.

    Let me say that I don't know the whole process you are running and you asked only for one task in this process. And I can easily imagine many situations when quick and easy preprocessing stage (like popososed above global change of names) could make main process much more efficient.

    And as said before - I don't know the whole process you are running - still one more suggestion:
    Why are there such "strange names" anyway?
    May be the most appropriate approach would be to ask source provider (earlier parts of your VBA code, other program used by you or someone else who prepares these files, web scrapper, ...) to provide them with proper names without renaming files already written in a folder.

    Last edited by Kaper; 03-30-2024 at 04:10 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. [SOLVED] Identifying and renaming the cells using first character
    By Varun13 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-09-2013, 01:05 AM
  2. [SOLVED] Renaming files using VBA
    By AdamParker in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-14-2012, 08:28 AM
  3. Renaming Files
    By scottmik in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2010, 07:40 PM
  4. Renaming Files
    By simonlap in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 02-22-2010, 07:02 PM
  5. Renaming files?
    By DarkSoul in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2009, 11:11 PM
  6. Renaming Files
    By Gordon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2006, 04:00 AM
  7. Renaming Files
    By Gordon in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-25-2006, 03:30 AM
  8. [SOLVED] Renaming Files
    By Bear in forum Excel General
    Replies: 2
    Last Post: 12-05-2005, 05:10 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