Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD DO /S ... all dirs wind up in the history!

May
12,846
164
When I do this:
Code:
do f in /s * ( echos x )
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.
 
I raised the same issue relative to COPY /S in the past and was informed WAD. I would like the directory history to include only those directories that have been entered explicitly, via CD/CDD/PUSHD or via the "implied directory change" available at the command prompt. The issue for me is that I often do "copy /s /uf" from a directory which has hundreds of subdirectories, and they all end up in dirhist... making previously entered directories virtually invisible.
--
Steve
 
I don't recall that and it would seem that it no longer happens. It did not do it in this test.
Code:
copy /s /u /f p:\4Utils\* v:\4utilscopy\
 
When I do this:
Code:
do f in /s * ( echos x )
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.

WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.
 
WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.
Really too bad. If it's not a bug, it's poor design. I've suggested it be changed in a future version. I am stuck with a hard-to-use dirhistory list (corrupted, IMHO) until I manually clean it out.
 
Vince,
If you are executing that DO command from the command line, there aren't many workarounds. But if you are doing it from within a batch script, you can save your dirhistory to a file prior to executing the command and then restore it afterwards.

Of course, you could do that from the command line too. It's just more of a PITA.
 
Rex,

WAD (and unavoidable) when "Save directory on entry" is set. (One of the reasons I really didn't want to offer that option.)

The only way around it is a substantial parser rewrite; IMO it isn't worth the considerable effort and risk involved.

Does this issue only happen when "Save directory on entry" is set? If so, can't you temporarily just turn that option off?
 
Really too bad. If it's not a bug, it's poor design. I've suggested it be changed in a future version. I am stuck with a hard-to-use dirhistory list (corrupted, IMHO) until I manually clean it out.

IMO it's not a poor design; it's a poor decision by a few users to demand that feature (and all its myriad associated problems) be added to an existing long-standing design that has no provision for it.

(You can bolt your lawnmower to your car, but it's probably not fair to then complain that your car does a lousy job mowing the lawn ...)
 
IMO it's not a poor design; it's a poor decision by a few users to demand that feature (and all its myriad associated problems) be added to an existing long-standing design that has no provision for it.

(You can bolt your lawnmower to your car, but it's probably not fair to then complain that your car does a lousy job mowing the lawn ...)
We users are not familiar with the limitations imposed by the long-standing design. From our point of view (I hope I speak for others) the request seems quite reasonable.
 
I added a dreadful hack (for DO only). I can't do anything about the general issue until I have a couple of weeks to rewrite the parser.
I don't see it as general. FOR /R and COPY /s don't do it. Where else can it happen?
 

Similar threads

Back
Top