I try to make a textfile with path
To find duplicate folders/subfolders name inside a root path (for example I start from Z:\METALAREA COLLECTION\) I test with this
@echo ON
SETLOCAL EnableDelayedExpansion
for /R /D %%# in (*) do (
echo "%%~n#">>"C:\Users\Peter\Desktop\text.txt"
)
and I get a textfile formatted in this very bad way
"A"
"# aggiornamenti"
"Abamath & Tahazu - Abamath_Tahazu [split]"
"Abamath & Tahazu - Abamath_Tahazu [split]"
"★"
"beta"
"★ Hekel - Waar de wind fluistert in de nacht, luister ik ★"
"★ Hekel - Waar de wind fluistert in de nacht, luister ik ★"
But I want a textfile formatted in this way
Abamath & Tahazu - Abamath_Tahazu [split]
Z:\METALAREA COLLECTION\ARCHIVE\A
Z:\METALAREA COLLECTION\# aggiornamenti
★ Hekel - Waar de wind fluistert in de nacht, luister ik ★
Z:\METALAREA COLLECTION\ARCHIVE\★
Z:\METALAREA COLLECTION\alfa\beta
Powershell solutions are good accepted because I have many folders with unicode or strange characters