1
I have running the following program,
@echo off
cls
set /p "filename=type file name>"
setlocal enabledelayedexpansion
for /r E:\ %%a in (*) do if "%%~nxa"=="%filename%" (
echo %%~dpnxa >>path.txt
)
I have got a output file path.txt
which contains,
E:\new.txt
E:\Redmi\new folder\new.txt
E:\windows\new folder\new folder\new.txt
I like to have those in separate files like,
E:\new.txt
in path1.txt
E:\Redmi\new folder\new.txt
in path2.txt
E:\windows\new folder\new folder\new.txt
in path3.txt
Don't use a static value for the target file but instead a (counting) variable or split the result by line break. – Seth – 2017-11-29T10:15:42.833