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

May 20, 2008
11,543
104
Syracuse, NY, USA
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
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
 
May 20, 2008
11,543
104
Syracuse, NY, USA
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\
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
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.
 
May 20, 2008
11,543
104
Syracuse, NY, USA
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.
 

samintz

Scott Mintz
May 20, 2008
1,514
18
Solon, OH, USA
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.
 

samintz

Scott Mintz
May 20, 2008
1,514
18
Solon, OH, USA
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?
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
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 ...)
 
May 20, 2008
11,543
104
Syracuse, NY, USA
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.
 

rconn

Administrator
Staff member
May 14, 2008
12,406
152
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.

You *should* be, given that it was discussed for many months before I was forced to implement it (and I had warned of the problems that would ensue)! :eek:
 
May 20, 2008
11,543
104
Syracuse, NY, USA
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
Thread starter Title Forum Replies Date
Alpengreis How to? Copy DIRs with attributes ... Support 4
gentzel Fixed dirs +n bug in 20.0.12 x64 Support 2
Alexander WAD The number of files and dirs are multiplied when using multiple wildcards Support 6
Charles Dye DIRS command vs. docs Support 1
J History file load hangs if file has complete garbage in it... Support 1
R History window wrong size, can't remember size change Support 12
T How to? retain command history across reboot? Support 6
nikbackm Speeding up the history dialog Support 6
D ParentDirectory does not update directory history Support 6
vefatica Command history search is off Support 7
D Directory History Window with wildcard search Support 3
R Long commands retrieved from command history have blank line when wrapped Support 20
Joe Caverly @HISTORY issues Support 4
vefatica Deleting entries in the command history popup? Support 3
H History and TPipe Oddness Support 3
D History and control-C Support 1
G Console exe up / down history Support 8
D What does the file "..\Everything\Run history.csv" store? Support 5
rps Cmd history recall Support 4
David McClelland Command history loosing entries Support 18
R history features. Support 6
rps How to? Shralias and producing history.sav, alias.sav .. Support 6
M Ctrl-C when using command line history does nothing Support 2
S Debugger Bat file call history Support 9
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
vefatica ESC after recalling a command from history Support 3
T TCHelp executable history? Support 2
thorntonpg @blahblah added to history. Support 0
M Call History popup-window? Support 0
M HISTORY lessons ... Support 0
vefatica The help and IE's history Support 16
D Towards shared (dir-)history lists Support 3
vefatica Ctrl-Enter in command history window? Support 8
vefatica History recall turns off Quick-Edit Support 4
C history is getting deleted under unknown circumstances Support 9
R V19 - At startup, TCC save directory in the directory history list Support 2
T [TCC 18] Can't read nor write history Support 1
I Possible Bug: History /n Returns Nothing Support 3
jbanaszczyk Lost history Support 4
T history.sav Support 4
T How to? sort history in tcexit.btm Support 22
vefatica OT: Windows console history? Support 7
S directory history locks up TCC Support 3
R In addition to ALIAS /Z and FUNCTION /Z, HISTORY /Z? Support 1
E TCC History popups too small Support 0
C How to? Keeping all history lists Support 4
E Command History not showing on up arrow button Support 8
nikbackm HISTORY /R1 performance Support 3
T Selecting line from popup history without executing Support 8
A How to? Filter history list with unicode chars Support 0

Similar threads