|> @echo off & setLocal EnableDELAYedeXpansion|
> for /f "tokens=* delims= " %%a in ('dir/b ^| find "xxxyyyzzz"') > do (
> ren %%a 123_%%a
(this is to Response nr. 4 - just a question by me, not directly related to the question in Response nr. 5)
Just a question M2, but if you use only /B with DIR, and not /S, he is not going to show the path anyway ...
So, he would only end up with ... "xxxyyyzzz" (if it exist). So, the code could be:
if exist xxxyyyzzz rename xxxyyyzzz 123_xxxyyyzzz