Você pode usar forfiles
, que é um comando nativo desde o Windows Vista.
Forfiles
Selects and executes a command on a file or set of files. This command is useful for batch processing.
Parameters
/p <Path>
Specifies the path from which to start the search. By default, searching starts in the current working directory.
/m <SearchMask>
Searches files according to the specified search mask. The default search mask is*.*
.
/s
Instructs the forfiles command to search into subdirectories recursively.
/c "<Command>"
Runs the specified command on each file. Command strings should be enclosed in quotation marks. The default command is "cmd /c echo @file".
/d [{+|-}][{<Date>|<Days>}]
Selects files with a last modified date within the specified time frame.
Source: Forfiles
Exemplo de uso
for /f "delims=" %%G in (
'forfiles /p %1 /m *.txt /s /c "cmd /c echo @path" /d -1'
) do ren "%%~G" "%%~nG.csv"