Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [dir]

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

6 votes
4 answers
61k views

How to find the cumulative size of a directory

Is there a switch for the dir command which lists the size of a directory as well? This page says: Dir also displays the total number of files and directories listed, their cumulative size, and ...
Chaitanya MSV's user avatar
4 votes
2 answers
7k views

Default file order of "dir" command in Windows console

Just wondering how Windows determines file ordering when running a dir command (without any arguments) in a command prompt. I know you can explicitly specify an order, but just curious how ordering ...
Moe Sisko's user avatar
  • 143
1 vote
1 answer
153 views

NAS Drive Not Correctly Reporting Files, Directories from a DOS/Command prompt in WIN7

I have an NAS drive on my network, and it works just fine. I can access every file on it with WIN7. However, when I go to a command prompt and perform a directory command, the command reports 0 ...
Joe Balke's user avatar
15 votes
6 answers
84k views

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, ...
rsk82's user avatar
  • 1,452
2 votes
3 answers
12k views

Displaying file names with a certain number of characters in command line

I need to list all text files on the C drive whose names are seven characters long. I tried the following command DIR ???????.txt However, this command displayed files with seven characters and less....
batsta13's user avatar
  • 123
29 votes
4 answers
85k views

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 ...
Johnydep's user avatar
  • 1,105
22 votes
3 answers
121k views

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 ...
Johnydep's user avatar
  • 1,105
7 votes
2 answers
14k views

How to get a list of non read only files in Windows?

I need to find a way to get a list of all the Non Read Only files under a specific path on windows server 2003. I tried the following command, but I also got all the directories which are non Read ...
GorovDude's user avatar
  • 367
2 votes
2 answers
4k views

How do I get a fully qualified file list from a shared folder?

I'm attempting to get a list of files on a shared folder (with their complete path names)- for example, instead of File1.txt File2.txt on \\sharename\foldername, I'm trying to get: D:\something\...
Emily's user avatar
  • 21
22 votes
4 answers
87k views

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

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 ...
David B's user avatar
  • 2,554
13 votes
3 answers
964 views

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 ...
Witness Protection ID 44583292's user avatar
1 vote
1 answer
393 views

Why do wildcards behave differently for different drives?

I'm using a Windows XP SP3 machine. My Z: drive is a mapped drive to a UNIX box. There is a file called wk1_dailybackup_20110605043344.sql in both z:\archive and c:\archive. At my CMD prompt from c:\...
zundarz's user avatar
  • 1,163
6 votes
2 answers
26k views

Why am I getting "File Not Found" when typing "dir" in the command prompt?

On my Windows XP machine, I type dir into the command prompt in a specific directory. It starts to list a bunch of files but then pauses and then shows File Not Found. Does anyone know why that ...
leora's user avatar
  • 6,163
3 votes
2 answers
9k views

How to pipe Windows "dir" in ANSI codepage

This applies to both Windows XP and Windows 7. Some of my files have names with European characters, for example the German a-umlaut, also known as a-diaeresis. These are displayed correctly in ...
Rich Pasco's user avatar
2 votes
4 answers
424 views

How to cd to a newly created dir?

cd "$(mkdir -v "$(date -R)"|sed s+.`(.*)'.*)" This is meant to create a dir named $(date -R). I could simply cd $(date -R), but the culprit is the date could change since the previous command was run ...
nnbvcn's user avatar
  • 21
8 votes
2 answers
8k views

Change Default Sorting Order of 'dir' Command in Windows

By default, Windows' dir command sorts files and directories alphabetically without grouping. The result is files and directories appear interleaved with one another. Sample output: F:\Dev Kits>...
Larssend's user avatar
  • 3,801
5 votes
1 answer
2k views

Changing the order of columns displayed with `ls`

Is it possible to change the order of displayed columns when running ls -l on *nix (or dir on Windows)? For example, I'd like to see the date modified, then the name, then other fields (or select ...
warren's user avatar
  • 10.2k
3 votes
1 answer
117 views

list files with first char within specific range

I need to list all files that have first char within a specific range. If I use Powershell I can do this with gci [a-c]* How can I do it from command line?
nick rulez's user avatar
10 votes
1 answer
12k views

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 ...
user78755's user avatar
  • 103
4 votes
5 answers
2k views

WinXP dir command: 3 and 4 char extensions are the same?

I'm trying to recursively search a directory tree to find all of the .asp files using the following command: dir *.asp /s For some reason, this returns not only the asp files, but also the aspx ...
chris's user avatar
  • 9,425
2 votes
2 answers
2k views

Directory search in Windows Command Prompt shows incorrect output

I searched for the following and it gave me the exact output (folder names changed) C:\temp>dir *950*.pdf /s Volume in drive C has no label. Volume Serial Number is ABCDE Directory of C:\temp\...
siliconpi's user avatar
  • 2,777
26 votes
5 answers
63k views

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's user avatar
  • 16.1k
10 votes
4 answers
27k views

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. ...
nonopolarity's user avatar
  • 9,706
9 votes
5 answers
39k views

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 ...
Jason S's user avatar
  • 7,755

15 30 50 per page
1 2 3
4