Sorting of directory listing in Command Prompt

Asked By 0 points N/A Posted on -
qa-featured

Sorting of directory listing in Command Prompt.

I am using the Command Prompt to display the list of my files in Windows Explorer is vulnerable to MALWARE.

What I want to happen is to display my direct listing in descending order without adding the parameter /O-D.

I want to just type the command DIR, and it will automatically display the file listing into descending order.

Please help.

#7

SHARE
Answered By 0 points N/A #81504

Sorting of directory listing in Command Prompt

qa-featured

Sorting of directory listing in Command Prompt.

Yes it is true that Command Prompt is safer to display files in listing than the Windows Explorer because of MALWARES today. I am also using the Command Prompt to remove manually MALWARES in my computer.

Going to the issue, we have a simple solution for that, we are confident that you will love this solution. Let’s get into the command prompt.

1. Press Window + R the type cmd.exe on the run dialog box then click ok.

2. Under the Command Line Interface (CLI) the following on the command prompt:

SET DIRCMD=/O-D

3. Now, type DIR on your command prompt then press ENTER.

The problem here is when you exit from the Command Prompt you need to type again the SET DIRCMD=/O-D. To make it permanent, create a DIRCMD=/O-D in your environment variable under your System Settings in Control Panel.

  1. Press Window + R then type SYSDM.CPL on the run dialog box and click ok.
  2. Click the Advanced tab.
  3. Click Environment Variable button.
  4. Then under the System Variables click New.
  5. Type DIRCMD on the variable name and /O-D on the Variable Value then click Ok.
  6. Run the CMD.EXE and execute the DIR command to see what happened.
DIR on your command prompt then press ENTER

Related Questions