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.)

119 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
63
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…
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
  • 30,396
  • 15
  • 136
  • 260
29
votes
5 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,155
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…
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
  • 16,236
23
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,155
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
  • 494
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,614
16
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,371
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,462
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?)
11
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,886
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
10
votes
2 answers

Windows Dir Command Not Behaving as Expected

In a directory, I have 3 files, all with the incorrect file extension jpgJPG. When I type dir *.j I get no results, as expected. When I type dir *.jp I get no results, as expected. But when I type dir *.jpg it lists the 3 files, even though the…
mbmast
  • 441
1
2 3 4 5 6 7 8