@ECHO OFF
cd /d "c:\new"
for /F "tokens=*" %%F in ('dir /s/b /a:-d *.') do ren "%%~F" *.doc
@ECHO OFF
for /F "tokens=*" %%F in ('dir /s/b /a:-d c:\new\*.') do ren "%%~F" *.doc
@echo off
for /F "tokens=*" %%F in ('dir /s/b /a:-d c:\new\*.') do ECHO ren "%%~F" *.doc
your code is working , can i ask you why it tried ran through C drive.
for instance the folder\files is on c:\new . is there a way when run your bat it just go to c:\new and that's it. i saw it running through program files/windows, look like complete c drive
secondly, there showing something file too long name so if my files has too long name, will it work?
many thanks in advance