I need to do 2 things.. The first is to create a 'readme' folder in each of the subdirs, and then copy info.txt from \toplevel\ to the 'readme' subdir.. so the end result would be:
I tried chaining two scripts I already have into one, and it creates the 'readme' subdir, but fails on the file copying part, apparently it doesn't travel through the subdirs properly:
Code: Select all
for /f "tokens=* delims= " %%a in ('dir/b/ad') do (
for /f "delims=" %%a in ( ' dir "*.txt" /b /s /a-d ' ) do (
echo processing "%%a"
copy /b /y "%%a" ".\readme\!name:~0!"
Thanks in advance for any help with this!