Q:

Add suffix to ALL filenames in subfolders recursively via Batch

Is there a way to add a suffix to all filenames (not the folders) recursively in all subfolders.
1.txt to 1_1.txt and so on
I tried and started with this: 
set "suffix=_1"
set "rootdir=C:\Test"
set "fileTyp=.txt"
set "filefilter=*.txt"
FOR /F "delims=" %%i in ('dir "%rootdir%\%filefilter%" /B^|findstr /V /I /B "%suffix%"') do ren "%%~fi" "%%~ni%suffix%%fileTyp%"

but it only works for the specific filetype in an specific folder and when the batch file is in the same directory as the .txt files. Otherways the error cannot find the file specified shows. 

A:

Based on what I think you want, give this a go:
@for /f "delims=" %%i in ('dir "C:\Test" /s /b /a-d ^| findstr /v "_1\.[^.]*$"') do (
   ren "%%~fi" "%%~ni_1%%~xi"
)

This will simply search through all filesusing /s in dir command, then exclude directories /a-d and exclude files already with suffix _1.* then we strip the filename into bits and rename the file to include suffix. for more on the expansion on those, see for /?

