ok we basically there TOP WORK
i start with a test setup as follows
i run your code as "RenameFileTest.bat" placed in downloads\test
this produces renamed files thus
downloads\test\downloads test RenameFileTest.bat
downloads\test\disc1\downloads test disc1
downloads\test\disc2\downloads test disc2
downloads\test\disc2\downloads test disc3
the file name in the run directory is kept but the files
in the disc1 disc2 and disc3 folder are renamed but the
original filename is not added and nor is the file extension retained. also it is adding the directory name above (downloads) which is not needed.
from original test set the end result i am after is
downloads\test\test disc1\test disc1 track1.mp3
downloads\test\test disc2\test disc2 track1.mp3
downloads\test\test disc3\test disc3 track1.mp3
basically you code achieves this but needs to retain the original filename prefixing it.
and the first folder needs to be the one the file is run in not the one above.
the only addition (or request) is to rename the subfolders with the parent folder name
test\disc1\ = test\test disc1\
many thanks for time and effort you have put in so far
it is greatly appreciated