I want to create a text file suicune in each directory of the tree except the root, but I also get a suicune txt file in the root. I only want it in subfolders.
I have tried using different combinations in the set to skip the root. I have tried googling for a solution to skip the root. I have searched in the /?
REM creates text file suicune
REM in each directory of the tree
set path="%C:\Users\Username\Desktop\Files%"
cd %path%
for /R %%a in (.) do (
cd %%a
echo hi > suicune.txt
)
pause
I expected a suicune.txt file to created only in subfolders of the directory but it's also created in the root directory.