How to remove every pipe from all selected file names

Bulk Rename Utility How-To's

How to remove every pipe from all selected file names

Postby Dawnb88 » Tue Jun 04, 2024 10:06 pm

I have been trying to remove all | pipes from the file names I'm working with but can't figure out how. I am trying to rename multiple video files with a bat file but can't rename the files with the pipe so I'm trying to remove them in bulk with this program and can't figure out how to. Now to explain a bit of what is going on there are 39 file names for now that I need to rename because the file names without the pipes renamed fine and without the word Trailer or trailer renamed correctly. But anything with the pipe or the word Trailer or trailer did not rename correctly so I did a bulk rename of the word Trailer and trailer. So now I'm stuck with the pipe randomly placed in every file name still I would need to remove each and everyone or copy and paste each edited file name which would not be to bad for 39 files but if I download some more and need to do it again it will suck. So I'm trying to find out how to remove the pipe mark from the entire list of file names.

here is a example: Haunted Mansion ? Official Teaser there are different lengths for each file name and some file names have only 1 pipe and some have 3 or more so I want to just remove everyone at once if possible.

Thank you in advance.
Dawnb88
 
Posts: 5
Joined: Wed Mar 13, 2024 2:10 am

Re: How to remove every pipe from all selected file names

Postby Admin » Wed Jun 05, 2024 8:15 am

Hi, | is an invalid character in Windows and I do not think you can remove it from within Windows:
https://superuser.com/questions/1798247/how-do-i-remove-unsupported-characters-from-a-filename-on-windows
Admin
Site Admin
 
Posts: 2926
Joined: Tue Mar 08, 2005 8:39 pm

Remove unicode versions of "|"

Postby Luuk » Wed Jun 05, 2024 9:56 am

Its unfortunate, but this forum software converted your "unicode-character" ---> "?".
If talking about a "Full Width Vertical Bar" that looks like " | " with a space on each side??
Then RegEx(1) needs a checkmark for "v2", with a "Match" like...
\xEF\xBD\x9C/g

But it only removes full-width vertical bars, if its some other unicode-character that looks like "|", this to remove all five...
\xEF\xBD\x9C|\xE0\xA5\xA4|\xC7\x80|\xE2(\x88\xA3|\x94\x82)/g
Luuk
 
Posts: 811
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to remove every pipe from all selected file names

Postby Admin » Wed Jun 05, 2024 12:04 pm

Hi Luuk, I m not sure that Windows will allow renaming a file that has an illegal character or just gives an error....
Admin
Site Admin
 
Posts: 2926
Joined: Tue Mar 08, 2005 8:39 pm

Remove unicode versions of "|"

Postby Luuk » Wed Jun 05, 2024 1:23 pm

Greetings Admin!
Yes, Im just talking about the five unicode-characters that can look like the illegal "|" symbol.
An easier way is the Remove(5) Chars box, but the forum software wont let me post the 5-unicodes!
Luuk
 
Posts: 811
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to remove every pipe from all selected file names

Postby Dawnb88 » Wed Jun 05, 2024 9:28 pm

Okay yes I did notice the pipe was converted to look like a question mark. These file names came from youtube titles from youtube dlp I download them as trailers for movies for my kodi program its easier to rename the movies I download from sites since I already have a small script for removing things that are not needed. So the movies are renamed quickly and the years after the titles are done like (YEAR) YEAR is the 4 digits.

So now with the trailer titles being all over the place like this:

Night Swim pipe official trailer
Living pipe official trailer

I'm trying to remove ever single pipe from every single file name since a lot of these file names have pipes placed in odd areas or randomly throughout.
Dawnb88
 
Posts: 5
Joined: Wed Mar 13, 2024 2:10 am

Remove unicode versions of "|"

Postby Luuk » Wed Jun 05, 2024 11:50 pm

The posted answer removes all five unicode-characters looking like the "|" symbol.
And it wont matter where they are inside of the filenames, or how many there are.

Image
Luuk
 
Posts: 811
Joined: Fri Feb 21, 2020 10:58 pm

Re: How to remove every pipe from all selected file names

Postby Admin » Thu Jun 06, 2024 8:30 am

Hi, to add on Luuk's answer, I found here some info on UNICODE vertical bars code points:

https://en.wikipedia.org/wiki/Vertical_bar#Unicode_code_points

I tried to remove them using Remove (5) -> Chars and it works as well.
Admin
Site Admin
 
Posts: 2926
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To