How do you set the dircmd environmental variable in XP?

J

John Corliss

I've carefully followed the directions on this page:

http://technet2.microsoft.com/windo...4153-4f8c-873e-58d91aedc1ea1033.mspx?mfr=true

and have added the following to my c:\windows\system32\autoexec.nt file:

SET dircmd=/a/o:gn/p

NOTE: there is NO "REM" before this line, so it should execute.

Yet when I reboot the computer, go to a command line screen and run
"DIR" in any large folder, the subfolders and files are still displayed
out of order and zoom by without pausing.

What am I doing wrong?

I have to ask, why isn't this the way files are displayed at the command
prompt anyway?

Who in their right mind would want the contents of a folder to scroll by
so fast that they can't even see them?

Who would want a list of files to be out of alphabetical order by default?

After all, in Windows Explorer, folders and files are displayed in
alphabetical order and you are allowed to scroll up and down the list.
The least one could expect would be for files to be displayed as close
to this as possible in a command prompt window.

If some security update has made using the dircmd environmental variable
unavailable, then things are getting out of hand.

Please note that my main question here is: what am I doing wrong in my
attempts to set the dirmd variable in autoexec.nt?

TIA
 
D

Detlev Dreyer

John Corliss said:
I've carefully followed the directions on this page:

http://technet2.microsoft.com/windo...4153-4f8c-873e-58d91aedc1ea1033.mspx?mfr=true

and have added the following to my c:\windows\system32\autoexec.nt file:

SET dircmd=/a/o:gn/p

NOTE: there is NO "REM" before this line, so it should execute.

Yet when I reboot the computer, go to a command line screen and run
"DIR" in any large folder, the subfolders and files are still
displayed out of order and zoom by without pausing.

What am I doing wrong?

This may or may not be caused by the wrong syntax since you failed to
insert a space character between the switches. Anyway, remove that line.

Control Panel > System > Advanced tab > Environment Variables. Create
the system variable "DIRCMD" and assign the value /a /c /p /x /o:gen
(example).
 
J

John Corliss

Detlev said:
This may or may not be caused by the wrong syntax since you failed to
insert a space character between the switches. Anyway, remove that line.

I agree. However, the page at the link above showed examples of using
the "dir" command with parameters which weren't separated by commas or
spaces, only forward slashes. The values are supposed to be unseparated
FWIU.
Control Panel > System > Advanced tab > Environment Variables. Create
the system variable "DIRCMD" and assign the value /a /c /p /x /o:gen
(example).

Wow is that buried! Still, I should have caught that one since I was
looking on that tab at something else just a couple of days ago.

Many thanks!
 
J

John Corliss

John said:
I agree. However, the page at the link above showed examples of using
the "dir" command with parameters which weren't separated by commas or
spaces, only forward slashes. The values are supposed to be unseparated
FWIU.


Wow is that buried! Still, I should have caught that one since I was
looking on that tab at something else just a couple of days ago.

Many thanks!

That did the trick all right. Thanks again, Detlev!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top