This will also add the extension to uppercase ... What was the problem for me ... So, how I "saved" the extension as a lowercase ...
accepted
@echo off
setlocal enableDelayedExpansion
pushd C:\WIS\Connect_Phoenix\CONNECT_FILES_FOR_UPLOAD\17Q4_PDFs
for %%f in (*) do (
set "filename=%%~f"
for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
set "filename=!filename:%%A=%%A!"
)
ren "%%f" "!filename!" >nul 2>&1
)
for /r "C:\WIS\Connect_Phoenix\CONNECT_FILES_FOR_UPLOAD\17Q4_PDFs\" %%G in (*.PDF) do ren "%%~G" *.pdf
endlocal
source
share