2
votes
3answers
4k 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 ...
0
votes
1answer
73 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 ...
5
votes
5answers
15k 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, ...
2
votes
3answers
1k 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 ...
1
vote
3answers
6k 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 ...
2
votes
2answers
3k 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 ...
1
vote
2answers
1k 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: ...
13
votes
3answers
850 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 ...
1
vote
1answer
143 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 ...
1
vote
2answers
2k 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 ...
3
votes
2answers
1k 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 ...
3
votes
1answer
77 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?
6
votes
1answer
4k 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 ...
2
votes
2answers
266 views

Saving directory list to text file

I found out I need to use dir /s > filelist.txt to lookup a directory list, what I need is to rename the file to filelist/currentdate.txt, how do I do that? EDIT: Guess I should have looked a bit ...
11
votes
4answers
5k 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?
1
vote
3answers
3k 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. ...
1
vote
3answers
261 views

On windows, how can I list files along with their created, modified and accessed dates?

The 'dir' command has a /T switch which selects whether to display the creation, access or modification time. However, it doesn't seem to be able to list files along with all three dates for each ...
4
votes
6answers
561 views

How can I get the “dir” and “copy” commands to operate on “*.xyz” but not “*.xyz~”?

When I use copy *.txt somefolder\ the system seems to copy all *.txt~ files too, which is not what I want. A similar same effect can be seen with dir: C:\Users\Paul\Documents\Programs\Proffy>dir ...
1
vote
5answers
4k 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 ...