You can also add multiple file types in the "in" parenthetical list. For example, I am working with thousands of various pictures as part of an archival effort, and this includes .jpg, .jpeg, and .PNG file types. Since the pictures came from numerous cameras and backup sources, there are duplicate file names to deal with. I modified the original batch file to meet my needs as follows:
@echo off for %%a in (*.txt) do ren "%%a" "DUP~%%a.tmp" ren *.tmp *.
Note: in my Windows 10 environment, I did not need to add the file type extension on the last line. When I did test with the final entry to address only .jpg files as: ren *.tmp *.jpg The resulting rename caused the file extension to be .jpg.jpg Leaving the line as I posted it in my example properly renamed as needed, and the correct file extensions were assigned according to the original file's extension (.jpg, .jpeg, or .PNG) as appropriate.
Hope this helps someone!