Hi,
I have few files in a folder. Just want to rename all and add test at the end of the file. Can any one please see this?
existing file name xyz.txt, abc.txt
want to rename as xyz_test.txt, abc_test.txt
Thanks,
need help in adding a word at the end of all files
Moderator: DosItHelp
-
- Posts: 51
- Joined: 10 Jan 2018 15:21
Re: need help in adding a word at the end of all files
Something like that should work:
Steffen
Code: Select all
for /f "delims=" %%i in ('dir /a-d /b *.txt') do ren "%%i" "%%~ni_test%%~xi"
-
- Posts: 51
- Joined: 10 Jan 2018 15:21
Re: need help in adding a word at the end of all files
You have been shown in your previous questions how to separate the file name from the file extension. Please do a little research of your own before asking questions.