Hello Everyone! I have over a thousand txt files that need renaming. Normally I would do this myself but I cant figure out how to make a batch file that will replace a .dot with a whitespace. They are all named like this...
name.sourceProgram.subSourceProgram.dateCreated.timeCreated.txt (the amount of dots sometimes varies)
Im still learning in C++, but I dont know any windows/batch scripting language. What I need is a simple batch/script file that can replace the .dot's with a whitespace then put .txt at the end of the files.
Thanks!
Paul
P.S. Sorry about the repost
Place this where the text file are located: @ECHO OFF SETLOCAL EnableDelayedExpansion FOR /f "tokens=*" %%a IN ('DIR /b "*.txt"') DO ( SET Var=%%~na SET Var=!Var:.= ! REN "%%a" "!Var!.txt" )Can I put a question here?
Awesome! your the best!
=) Thanks, glad it worked. Can I put a question here?
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |