0

How can I find all files that have a name like ALPS*.doc in a folder like P:\Systems\A.L.P.S\?

I tried this using the command line but it returns zero:

Systems\A.L.P.S>dir /s /b c:\ |find /c "\ALPS*.doc"

What am I doing wrong?

2 Answers 2

1

You can directly specify what to list in the directory from the dir command itself.

So you would use this command:

cd /d c:\
dir /s /b ALPS*.doc

You first navigate to the root, then search recursively from there.

Do note that searching from C:\ will only find results in C:. If you want to search in P:\Systems\A.L.P.S, you of course have to search from that folder. the first line would then be:

cd /d p:\Systems\A.L.P.S
4
  • thanks, so is there a way of just getting a count of all the files with a name like ALPS*2013*.doc ? Commented Oct 13, 2014 at 14:06
  • is there a way of counting all the files without listing them, or do I have to output them to a (text) file? Commented Oct 13, 2014 at 14:16
  • If you do not care for the filenames, you can ommit the /b which gives a detailed result including the filesize per file, but also a summery at the end stating how many files were found and what its size is.
    – LPChip
    Commented Oct 13, 2014 at 17:34
  • 1
    Alternatively, you can use this command: dir /s /b ALPS*.doc | find /c "ALPS" assuming ALPS is not written twice in the name.
    – LPChip
    Commented Oct 13, 2014 at 17:37
0

Within Powershell.

Get-ChildItem C:\ -Recurse "ALPS*.doc"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .