Stripping out characters from file names


  1. Posts : 209
    W10
       #1

    Stripping out characters from file names


    Is there a quick way to remove a set of characters from file names.

    I have folders where there are a great number of files .... typical format:
    P1001214451_1.dng
    what I want to do on every file is strip off the last 2 characters which will always be '_1'
    Is there an easy way to do this, well over a thousand files over many folders.
      My Computer


  2. Posts : 43,003
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    You can use a rename utility e.g. Bulk Rename
    Bulk Rename Utility - Free File Renaming Software

    - if you can cope with the GUI.

    Another possibility:
    Advanced Renamer - Free and fast batch rename utility for files and folders

    Make sure you practice on some test folders first, and make a full backup (image) before letting it rip.

    Otherwise if you want a command line option read through this:
    recursion - Mass rename of file extensions recursively (windows batch) - Stack Overflow
      My Computers


  3. Posts : 1,767
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #3

    Have a look at joejoesoft.com's small, free, portable RenameMaster.

    Not only will it do what you want easily (using option 6 - Replace/Find and Replace) but it has both 'preview changes' and 'undo changes'.
    Stripping out characters from file names-renamemaster-_1.png

    I've been using it for years and have just updated from v3.13 to the latest version.

    It also has a commandline mode but I haven't used that.

    Hope this helps...
      My Computer


  4. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #4

    When I see added characters such as the -1, _1, (1) it has meant it's a second copy of a file and usually can't remove that 'extra' without doing more with the name. A folder [or older name of directory] cannot contain 2 or more file names exactly the same, always have to be at least one character different between them.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:47.
Find Us




Windows 10 Forums