Looking for a quick way to add lines of text after | if possible
-
Okay so here is what I’m trying to do I am using Notepad++ to help with the renaming of multiple files at once. So here goes:
Step one download video files
Step two check every box for the video files and use copy as path and paste into Notepad++
Step three remove the "Location up until the title of the video file
Step four remove everything after the YEAR of the video one line at a time and place () around the year.Now I will be keeping a copy of the finished renamed files and making a second copy of the copy to path now I have a clean version and a version that is not cleaned yet. I take the unclean version and remove everything until the / after the file location from the original unclean version and then I take the last " and replace it with a |. Now here is what I need to do I need to take several lines of text and place them in a list kind of style all after the |.
Example unclean will look like this “From Time To Time - Trailer.mp4|” without the quotes. and I need to place the “From Time to Time (2010) trailer.mp4” without the quotes. But there are (66) lines I need to complete and using Ctrl+l to cut each line and then placing it after the | is a bit hard and time consuming. Is there a faster easier way of doing this?
-
@CheapSweetLife said in Looking for a quick way to add lines of text after | if possible:
Is there a faster easier way of doing this?
Probably. However, we would need a more detailed description of what you are trying to accomplish before we could be much help.
Honestly, if you have 66 of these to do… by the time you explain yourself clearly enough that we can help, then wait for replies, then clarify the parts of our responses you don’t understand… lather, rinse, repeat… you probably can just do the 66 lines by hand.
However, if you want to learn, for future use, then help us help you by giving a more concrete example. Highlight the samples you enter and use the button above where you enter text that looks like this: </> to separate them as snippets that won’t be reformatted by the forum software and that we can copy and paste for experimentation. Show us a sample of the data you have to begin with and the results you hope to obtain.
If there is more than one input file involved, be clear about that — I get the feeling there might be, but it’s not at all obvious to me what is coming from where.
-
@Coises
This is how I do it normally:
“C:\Users\Me\Downloads\sitenamerandom - Watch Patch Adams 1998 Online Free on sitenamerandom.mp4”
“C:\Users\Me\Downloads\sitenamerandom - Watch Tarot 2024 Online Free on sitenamerandom is.mp4”
“C:\Users\Me\Downloads\sitenamerandom - Watch Good Morning Vietnam 1987 Online Free on sitenamerandom.mp4”
“C:\Users\Me\Downloads\sitenamerandom - Watch Jack 1996 Online Free on sitenamerandom is.mp4”
“C:\Users\Me\Downloads\sitenamerandom - Watch Mrs Doubtfire 1993 Online Free on sitenamerandom.mp4”I make 2 files and I have the original file names and then I remove everything from the beginning until the first letter of the title of the movie. So I remove the entire "C:\Users\Me\Downloads\sitenamerandom - Watch and then after the four random numbers I remove everything and replace it with .mp4. then I have something that looks like below.
Patch Adams (1998).mp4
Tarot (2024).mp4
Good Morning Vietnam (1987).mp4
Jack (1996).mp4
Mrs.Doubtfire (1993).mp4So I would have to cut each line of the clean text starting from Patch Adams (1998).mp4 and place it after the | so it would look like below:
Patch Adams 1998 Online Free on sitenamerandom.mp4|Patch Adams (1998).mp4
And I would continue until the entire list is done. But the lines are sometimes different lengths and I don’t know how to copy and paste the entire text file to the end of the list.
I do also use a free porgram called Bulk Renamer Utility but I don’t know how well to use that ether and I normally will remove the beginning part from the files with that program but I just figured out the other day how to take the clean and place it after the | one at a time and then save it and place it inside the bulk renamer utility and change all names at once. So once done I remove the old rendom list of the original file names from notepad++ and keep the clean list and then I have it for the trailers. But then the trailers are all named random things.
This is a movie trailer I recently downloaded “The Amityville Horror Official Trailer #1 - Rod Steiger Movie (1979) HD.mp4|” without quotes.
So first I rename the main movie files and I also download the trailers but the trailers and main movie files always have different names. So it makes it a bit harder so then I need to rename each file again with cut and paste after each |.
“C:\Users\Me\Downloads\sitenamerandom - Watch Patch Adams 1998 Online Free on sitenamerandom.mp4”|Patch adams (1998).mp4
“C:\Users\Me\Downloads\sitenamerandom - Watch Tarot 2024 Online Free on sitenamerandom is.mp4”|Tarot (2024).mp4
“C:\Users\Me\Downloads\sitenamerandom - Watch Good Morning Vietnam 1987 Online Free on sitenamerandom.mp4”|Good Morning Vietnam (1987).mp4
“C:\Users\Me\Downloads\sitenamerandom - Watch Jack 1996 Online Free on sitenamerandom is.mp4”|Jack (1996).mp4
“C:\Users\Me\Downloads\sitenamerandom - Watch Mrs Doubtfire 1993 Online Free on sitenamerandom.mp4”|Mrs.Doubtfire (1993).mp4 -
@Coises
Or even if there was a way to add all the clean text to the front of the lines near the numbers and then just move them from the front of the line of text to the back of the line of text after the |. I know it might sound odd but at least then its a straight line and then I’m just moving everything before the "location to after the | I hope this makes sense.So it would look like this:
1.“text random.mp4”|
2."Text Random.mp4|1.Clean Text.mp4 “text random.mp4”|
2.Clean Text.mp4 “TextRandom.mp4”|And then just move everything from before the Space" to after the |.
I did learn how to add the same text to the beginning of the file by using the ^ but I don’t know how to place copied text there only the same thing every single line.
-
@CheapSweetLife
Plus this is not the only time I will be using this since I have been editing the metadata on several .mp4 files for my kodi program and I’m always adding more movies all the time and normally add them like 15 or 20 at a time to my hard drive so I would need to rename 20 movie files and then rename 20 trailer files all the same name except for the trailers would have trailer at the end. So this would be something I would be using a lot not just for these specific files I hope this makes sense. -
@CheapSweetLife
Given what I think you are trying to do, I would do this:Start with the file with all the original file names in it. Run this search/replace:
Find what:^.* - Watch (.+?) (\d\d\d\d) .*\.mp4"$
Replace with:ren $&\t"$1 \($2\).mp4"
and Replace All.Make any necessary edits to the names at the end of each line and save as a *.bat file. Then double-click the file to run it and rename all the files.
-
@Coises
Okay freaking genius way of doing things I don’t even need to add the | at the end anymore since I don’t need to use the Bulk Renamer Utility. This makes things so much simpler. I want to tell you thing worked great for the last 10 movies I have bee working with but now the only big issue is renaming the trailers. Since there names are always all over the place.From things like:
Criminal (2016 Movie) Official Trailer – “Remember”.mp4|
Crimson Peak Official Trailer #1 (2015) - Tom Hiddleston, Jessica Chastain Movie HD.mp4|
Darkman Official Trailer #1 - Liam Neeson Movie (1990) HD.mp4|
Dreamer Inspired by a True Story Trailer (2005).mp4|
From Time To Time - Trailer.mp4|
GHOSTBUSTERS: FROZEN EMPIRE - Official Trailer (HD).mp4|so using that same code would be a bit harder since there is nothing that matches from file name to file name. but at least the movie files will be done in a freaking snap now. I really want to thank you for the help with that.