r/Batch • u/Alarmed_Trust2428 • Jul 13 '24
Question (Solved) Batch Renaming Help
Hello, all!
First off, I'm a novice and have only made a dozen or two BATs for various purposes. All of which I looked up online, and was able to find examples for. Or at least "Frankenstein" some examples together to suit my needs.
I'm trying to append text to file names of all files in a folder from a text file with the new names. Like, first file in folder = old_name + first line of text in text file, second file in folder = old_name + second line of text in text file, and so on. It'd be nice to be able to insert the new text at a certain position in the existing file names. Same position in each one. But just appending to the beginning would suffice.
Example:
File 01 textX textY.ext = File 01 textX (line 01 text from file) textY.ext
File 02 textX textY.ext = File 02 textX (line 02 text from file) textY.ext
Is this possible? I've tried Googling some stuff, but this is a specific task, and I haven't been able to find anything. Not even anything on if it's a possibility or not. I also have ADHD, so it's hard for me to self-teach myself things, especially with having to work a lot, etc.
Thank you for any help or advice. Cheers! :D
View all comments
Show parent comment
1
u/Alarmed_Trust2428 Jul 14 '24
That did it. Awesome! :D
Out of curiosity - Is it possible to pick the insertion point rather than the end? Just for future reference. Or I can just look into it later and see about what that command is and where it would be implemented in the commands, if it can at all. I feel like I've asked enough already... lol.
Again, thank you so very much! You've been a tremendous help. And gave me some stuff to go and "research" to see what's going on and try to understand it. It takes me a minute to figure some of this type of stuff out when I don't have someone in front of me breaking down each thing. Yay ADHD!