Hi All,
Please help me to write a batch fileWindows Batch to rename only file names with SSR0xxxx.txt to SSR0xxxx.csv
there are plenty of files to be renamed are SSR01000.txt
SSR01001.txt
SSR01999.txt
SSR09999.txtI tried the below but picking many other unwanted files SSR09999_1.txt, SSR09999_copy.txt ...etc
for /r %x in (SSR0*.txt) do ren "%x" *.csvPlease help me on how to rename those files with 4 digits only after the static file name SSR0
Thanks in advance Gurus
Simplest method offhand:
for /L %%a in (1000 1 9999) do ren SSR0%%a.txt SSR0%%a.csv 2>nul
::==== endthis excludes anything but the four digits between 1000 and 9999 to qualify for your files to be renamed. (Also excluding 0001 - 0999)
message edited by nbrane