All Questions
10
questions
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:\...
-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 ...
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
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 ...