All Questions
46
questions
1
vote
1
answer
310
views
How to get last modification date timestamp in "DIR /S /B" result?
In the early days of Windows (3.1, Windows 95) there was a wonderful feature, called "Find", which could be used for finding files on your computer.
Some *** has decided to remove this ...
1
vote
2
answers
188
views
Show only folder name with the link information via Windows DIR
How can I get only folder and its symbolic link information output via dir?
What I want is this, where CNET and projects are symbolic links:
CNET [\\192.168.1.10\CNET]
elements
localized
projects [\\...
1
vote
2
answers
500
views
Powershell equivalent of "dir /a"?
Running dir /a on a given directory on one of our servers produces a list of unexpected files that look like malware:
C:\Users\<username>dir /a c:\Users\Public\Downloads\
Volume in drive C has ...
0
votes
0
answers
150
views
What does [...] mean for Reparse Point Target when dir /al is executed
When I execute dir \al (Attribute: Reparse Points), I get a result that lists reparse points. The following output is easy enough to understand with columns being Date Modified, Time Modified, Dir ...
3
votes
2
answers
7k
views
What's the easiest way to map "ls" to the "dir" command in Windows? [duplicate]
I've found a few posts on command line aliases in Windows but most of them relate to aliasing long cd commands/paths that are frequently used and I can't make them work for my needs.
In my case, I ...
1
vote
2
answers
2k
views
How to get the only the total files size from folders in windows commandline
How to get the only the total files size from folders dir in windows commandline
[self answered]
0
votes
2
answers
3k
views
List each subdirectory and the number of files within it using cmd.exe
I have several subdirectories that contain files, and I want to list each subdirectory and beside it the number of files (*.html specifically) within that subdirectory. For example, I am in "C:\...
0
votes
1
answer
2k
views
Can I get a list of media files duration using something like DIR?
I'm at folder Music, all right? and let's say I want to know the name and other attributes of every song in that directory, then I'll just open a terminal and go
dir > musicFiles.txt
but that ...
0
votes
2
answers
334
views
Windows cmd dir hogging CPU
I have a couple of these "Windows command Processor" (cmd) running a dir command and taking 10-15% CPU constantly, heating everything up and well hogging CPU.
I also see findstr running ...
1
vote
3
answers
6k
views
Windows command dir lists files with absolute path, relative path required
I would like to list all filesnames of all files with a specific extension in a directory structure and write this to a file. What I have reached:
dir /B /S *.ext > list.filenames
This gives me a ...
-2
votes
1
answer
188
views
How do I use the command line to search for multiple characters at the same time?
Write a DOS command to display all files on drive C: whose filenames are 7 characters long and begins with the letters CHAR.
5
votes
2
answers
3k
views
How can I output a list of filenames surrounded by quotation marks?
In Windows Command Prompt, I can use the dir command to output the names of all PNG files within a directory:
dir *.png /od /b > files.txt
file 1.png
file 2.png
...
However, the image files I am ...
9
votes
1
answer
220
views
Understanding why the DIR command behaves this way
Why does:
dir "test.txt "
dir test.txt.
dir "test.txt . . ."
all lists test.txt with no error on Windows prompt?
Are there any other suffix that are ignored by Windows?
(please note that I ...
0
votes
1
answer
361
views
Why would the DIR command not be working for the documents folder in CMD?
Why would it be that I can't list the contents of the documents directory, but it works for every other folder. It is behaving like I accessed the special folder "My Documents", but I didn't.
The ...
3
votes
2
answers
1k
views
DIR command that ignores files with multiple extensions
I have a directory containing a single .exe that I need to find using DIR. However, I also have files in the same directory that end in .vshost.exe.
I always end up with both files matched to my *.exe ...
0
votes
0
answers
68
views
How can I easily open a command prompt in current folder with /u (set to unicode output)?
I'm trying to output directory and .txt file names using the following:
dir /b /s /a:d >> "filenames.txt"
dir /b /s *.txt >> "filenames.txt"
But some of the file and directory names use ...
0
votes
0
answers
653
views
Wildcard behavior in Windows DIR to show files in multiple subdirectories
I want to list files under both the Local and LocalLow directories under C:\Users\USERNAME\APPDATA but when I use the following command:
dir /s c:\users\me\appdata\Loca*
it only shows items ...
3
votes
1
answer
9k
views
How to not show file path with dir /b /s command in batch file
Is there Any way I can bypass displaying file paths when using the dir /b /s command into a file?
Currently, when I run dir /b /s C:\WinPE_amd64 >dir.txt it outputs something like this:
C:\...
4
votes
1
answer
5k
views
DIR shows file sizes in parentheses
On some server, I noticed that the CMD DIR command showed some file sizes between parentheses. What does that mean?
1
vote
2
answers
652
views
How do I search for non-hidden files in hidden subfolders using Windows Command Line
Looking through Google and super user stack exchange showed me how to search a folder and it's subfolder for hidden files
dir /A:H /S testHiddenFile*.txt
or hidden folders:
dir /A:HD /S testFolder
...
62
votes
5
answers
11k
views
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 ...
1
vote
2
answers
616
views
How to run default dir command under FAR file manager?
I have Cygwin installed somewhere in the path. So I have
>where dir
D:\Users\Dims\Design\Cygwin64\bin\dir.exe
When I run DIR from CMD I get the normal Windows DIR:
>dir /?
Displays a list of ...
1
vote
0
answers
409
views
Windows DIR analogue of ls -v
In linux, ls -v returns a file list in a "natural sort" order -- that is, when the name has a numerical part, it is sorted as a number:
file1.txt
file2.txt
file11.txt
Is there a way to ...
1
vote
2
answers
2k
views
Listing folders in CMD which does NOT have a specific subfolder
I've an issue where i need to locate all folders on a drive which does NOT have a folder in them called "Arg".. I know how to do it in reverse using DIR, i.e to find all subfolder with a specific name,...
0
votes
1
answer
85
views
Windows DIR command searches folders it shouldn't
I'm trying to create a batch file that searches certain folders on our server for JPGs and creates a txt file with them. It works fine BUT for some reason it always adds a folder to the end of the ...
6
votes
2
answers
2k
views
How to make AppData directory appear in File Explorer?
This post outlines how to make the AppData directory show up at the DOS prompt, but how do I make it show up in File Explorer (on Windows 7 Home Premium 64-bit)? Is there a global setting? Also, what ...
5
votes
5
answers
8k
views
Copy file names with a certain number of characters in command line (CMD)
I need to copy all text files on one folder whose names are five characters long. I know this command is for listing:
$ dir folder /B | findstr /R "^.....\.txt"
but I want to copy all files whose ...
0
votes
1
answer
4k
views
Is there a Window's Command Line Option to Show the Sizes of Directories
When I do a dir command it, gives this information:
02/11/2015 01:39 PM <DIR> bar
11/11/2014 07:22 AM <DIR> buz
02/12/2015 01:35 PM 140,660,736 foo.sdf
01/...
15
votes
5
answers
131k
views
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 ...
0
votes
1
answer
49
views
On Windows 7, how can I identify any folders that contain files that have not been updated in x years? [duplicate]
On Windows 7, how can I identify any folders that contain files that have not been updated in x years? I would like to clean up unused files/folders on network drives. Initially, I just need a list of ...
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 ...
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 ...
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, ...
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....
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 ...
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 ...
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\...
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 ...
1
vote
1
answer
392
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:\...
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 ...
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>...
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?
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 ...
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?
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.
...
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 ...