When I do this:
every folder entered by DO winds up in the dirhistory list. I do have "Save directory on entry" checked but I wouldn't expect it to behave like that. "FOR /R" doesn't do that.
Code:
do f in /s * ( echos x )