First command - to find occurrences of \\B2 in text files.
findstr \\B2 *.txt
Second command – this is to find which files has the XYZ filename.
dir d: |findstr XYZ
Third command – this is to copy files in current directory to d:\temp which has XYZ as filename.
for %c in (*XYZ*) do copy /y "%c" "d:\Temp"
All three commands can be executed in DOS mode.