Minor problem. Incorrect value internal var _dir_files

Apr 13, 2010
301
7
61
The Hague
When using option /Nm:1, DIR returns the correct output but the internal variable _dir_files is zero.

The same variable has the correct value if this option is not used.

I added a screen shot with an example.

Cheers, DJ
 

Attachments

  • Knipsel.PNG
    Knipsel.PNG
    8.7 KB · Views: 91
Last edited:
May 20, 2008
11,297
95
Syracuse, NY, USA
Hmmm! With /Nm:1, I'd expect you'd only see one directory (namely ".") and no files. That's how it works here, and that makes me wonder how it might be used.

If you're talking about _dir_dirs, I see what you mean. _dir_dirs is 0 when /n:m is used.
 
May 20, 2008
11,297
95
Syracuse, NY, USA
Code:
v:\> *dir /nm:5 i*

 Volume in drive V is DATA  Serial number is c007:d3e4
 Directory of  V:\i*

2014-06-16  21:19  <DIR>  InternetRegistries
2012-06-05  01:46  <DIR>  ip2c
2014-06-03  12:38  <DIR>  ipalloc
2014-05-27  17:01  178  iconshow.btm
2014-06-03  12:34  25,091  ipalloc.txt
  6,475,681,792 bytes free

v:\> echo %_dir_dirs
0

v:\> echo %_dir_files
0
 
May 20, 2008
11,297
95
Syracuse, NY, USA
Hmmm! Compare these two, one of which worked, one of which didn't. Notice that the tolals line is missing from the second one.
Code:
p:\> *dir /nm:10 v:\i* & echo %_dir_dirs & echo %_dir_files

Volume in drive V is DATA  Serial number is c007:d3e4
Directory of  V:\i*

2014-06-16  21:19  <DIR>  InternetRegistries
2012-06-05  01:46  <DIR>  ip2c
2014-06-03  12:38  <DIR>  ipalloc
2014-05-27  17:01  178  iconshow.btm
2014-06-03  12:34  25,091  ipalloc.txt
2013-10-20  01:26  244  ipconfigall.btm
2013-11-02  17:10  617  ipcountry.btm
2013-11-03  14:48  831  ipcountry2.btm
2014-06-03  12:36  17,567  ipreg.txt
  44,528 bytes in 6 files and 3 dirs  65,536 bytes allocated
  6,475,677,696 bytes free
3
6

p:\> *dir /nm:5 v:\i* & echo %_dir_dirs & echo %_dir_files

Volume in drive V is DATA  Serial number is c007:d3e4
Directory of  V:\i*

2014-06-16  21:19  <DIR>  InternetRegistries
2012-06-05  01:46  <DIR>  ip2c
2014-06-03  12:38  <DIR>  ipalloc
2014-05-27  17:01  178  iconshow.btm
2014-06-03  12:34  25,091  ipalloc.txt
  6,475,677,696 bytes free
0
0
 
May 20, 2008
11,297
95
Syracuse, NY, USA
When I ask for fewer than exist, it fails. No SUBST involved here.
Code:
s:\> *dir /nm:129 c:\windows\system32\i* | grep allocated & echo %_dir_dirs & echo %_dir_files
0
0

s:\> *dir /nm:130 c:\windows\system32\i* | grep allocated & echo %_dir_dirs & echo %_dir_files
  57,448,217 bytes in 125 files and 5 dirs  57,655,296 bytes allocated
5
125

s:\> *dir /nm:131 c:\windows\system32\i* | grep allocated & echo %_dir_dirs & echo %_dir_files
  57,448,217 bytes in 125 files and 5 dirs  57,655,296 bytes allocated
5
125
 
Similar threads
Thread starter Title Forum Replies Date
D Fixed Minor problem: output not alligned in the tree command Support 1
Peter Murschall Some minor flaws Support 15
Alpengreis Documentation Minor issue in help file for view /E Support 1
D WAD Minor Post Installation Bug in V18 Support 1
dcantor Help file minor error Support 0
R Minor Cosmetic Issue in Take Command Window Support 2
jbanaszczyk help files: minor inconsistency Support 2
S Suggested minor improvements for www.jpsoft.com Support 5
M Just a minor annoyance re one particular plugin... Support 25
M Just a minor oddity... Support 9
Dan Glynhampton Documentation v15 help: Minor niggles Support 0
Dan Glynhampton Documentation Minor issues with HELP Support 0
M A minor complaint... Support 9
M A (minor) limitation of @FileSize... Support 6
Charles Dye Minor nit: DIR /F, IFTP, colorization Support 4
vefatica Install two minor versions Support 4
A minor documentation fix - command line editing Support 0
A del /w [minor documentation fix] Support 0
A Minor documentation fix ["-" on command line] Support 3
Roedy WAD Minor long-standing install problems Support 6
M A minor but annoying issue with the "MD" command... Support 20
R A couple of minor issues with new forum. Support 4
M A somewhat humorous minor-request related to "Shift" command... Support 4
gschizas (minor) Help topic "Colors, Color Names and Codes" is wrong Support 0
M Minor "For" issue... Support 1
M A question about new behavior that’s a minor irritation… Support 16
M An undocumented limitation and an associated minor bug... Support 1
S SETARRAY - minor issue Support 0
H Minor bug in v12 SENDMAIL Support 0
J ZIP Help - minor quibble Support 0
S BDEBUGGER - minor issue Support 2
gschizas Minor (really minor) registration issue Support 0
S Virtual disk detection, minor enhancement requests Support 0
S Minor HELP issues Support 1
Charles Dye Minor installer quirk Support 1
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3

Similar threads