Questions tagged [dir]

for questions related to the `dir` command, which lists directory contents in MS-DOS and Windows-based operating systems

This tag is for questions related to the dir command, which lists directory contents in MS-DOS and Windows-based operating systems

There is an equivalent command ls in Unix-based operating systems. (The ls command is also available in Windows if cygwin has been installed.)

109 questions
97
votes
2 answers

Why is DNS apparently involved in issuing "dir" on Windows 10?

For complicated reasons, I have been forced to make an identical copy of cmd.exe and rename it to cmd-2.exe, which I put as a shortcut on the Taskbar to have them "grouped" in different taskbar groups. Sometimes, I forget about this, and to open a…
Khalid
  • 739
  • 1
  • 5
  • 4
62
votes
5 answers

Why does `dir *.*` give me all files and folders?

When I run dir *.* it produces unexpected results. Even files and folders without any dot in their names are listed. For example C:\>dir *.* Volume in drive C is System Volume Serial Number is AC0A-29DA Directory of C:\ 14-03-2017 05:17 PM …
phuclv
  • 26,555
  • 15
  • 113
  • 235
59
votes
9 answers

How to view all the Symbolic links, junction points, hard links in a Folder using dir?

The command dir /a displays a list of all the files and folders in a given location. But it displays the type for Junction Points as well as Symbolic Links to Folders. Is there any command which will differentiate and tell me which of…
Dhiwakar Ravikumar
  • 2,109
  • 5
  • 25
  • 39
28
votes
3 answers

Excluding files of particular extension using DIR command on windows command line

if i want to see e.g. files of a particular extension only using dir listing, i can do that using the command: DIR *.txt And it shows all files with .txt extension. Now i want to know is there any command with wich i can exclude certain…
Johnydep
  • 1,075
  • 5
  • 13
  • 18
27
votes
1 answer

Non-hidden directory doesn't show in Explorer, but the program that made it can access it

I'm using IMAPSize to backup my mailboxes. The process just dumps the contents of your mailbox into .eml files on your disk. Anyway, the first mailbox I backed up shows up as I expect. However, the next one doesn't show in Explorer and, if I enter…
Xophmeister
  • 523
  • 5
  • 14
26
votes
5 answers

Where are the standard Windows prompt commands files?

If I type dir in the command line, I guess it executes a dir.exe hidden somewhere in the system. Is there such a file? Where is it?
Jader Dias
  • 15,756
  • 60
  • 143
  • 196
22
votes
1 answer

How to change CMD start directory

I want to change the CMD startup directory when I launch it via Start+R Currently, it points to my users folder. I need it to point to C:\Windows\System32\ When I navigate using explorer to C:\Windows\System32\ and run CMD from there…
Lucas BS
  • 482
  • 1
  • 3
  • 18
22
votes
4 answers

How do I recursively list filenames (only) in DOS/Windows?

Possible Duplicate: Get bare file names recursively in command prompt I would like to recursively list all files in a directory, showing filenames only (without extensions and without the full paths). I'm using Windows/DOS. The closest I could…
David B
  • 2,454
  • 7
  • 27
  • 33
20
votes
3 answers

List only files of a particular extension with the DIR command

On Windows, we can see directory content using the DIR command. I want to know, how can one see the list of only those files which have particular extension, e.g I want to see list of all .txt files, what command I should run?
Johnydep
  • 1,075
  • 5
  • 13
  • 18
15
votes
5 answers

windows command line dir command: to display only the file name, in 8.3 format?

I know that "dir /w" or "dir /b" shows only the file name. While "dir /x" or "dir /X" shows the 8.3 format, but together shows all other information like long format file names, dates and size. is it possible to call dir, that only shows the file…
athos
  • 2,249
  • 10
  • 40
  • 56
15
votes
6 answers

how to list all files and directories in given directory with full path but not recursive?

Somehow like dir /b command but I need also hidden and system files there. Built in dir command doesn't allow to list such 'hidden' files with the rest and I must use /s to have full path in there, which is of course non recursive. I also played…
rsk82
  • 1,442
  • 7
  • 21
  • 27
13
votes
3 answers

Are the "." and ".." entries in a dir listing always the same?

When would the "." and ".." entries in a dir listing differ? (I understand they represent two different directories, but they always list identically with the same date and time in a default dir command. Do they ever differ?)
10
votes
1 answer

Is it possible to pipe a list of files to RMDIR on Windows?

I am writing a batch file for the Windows command prompt to delete all directories matching a certain expression. I am first using DIR to return a plain list of directories matching the expression. I would like to pipe each line of output into the…
user78755
  • 103
  • 1
  • 1
  • 4
9
votes
4 answers

On Windows 7, dir or tree can't show unicode characters, even starting cmd with cmd /U

On Windows 7, dir or tree can't show unicode characters, even starting cmd with cmd /U So I would press Window Key + R to run something, and type in cmd /U so that the content might handle Unicode. And then using dir or tree /F, the content in…
nonopolarity
  • 9,516
  • 25
  • 116
  • 172
9
votes
5 answers

command-line / batch file to list all the jar files?

I want to list all the jar files in subdirectories of a specified path, on a Windows computer, along with the file size & times. dir /s gives me too much information. dir /s *.jar sort of does what I want, but gives me a bunch of information…
Jason S
  • 7,503
  • 16
  • 60
  • 79
1
2 3 4 5 6 7 8