0

I am trying to find and remove any instance of a .dll that appears in any directory that's on the PATH environment variable in windows.

Is there an easy way to do this from the CMD window?

6
  • The reason you can't use Windows Search is because?
    – Ramhound
    Jun 16, 2015 at 18:39
  • Is there a way to make Windows Search search in a set of directories, like in the PATH environment variable? I know how to make it search in a subdirectory. But I don't want to manually cut and paste each directory from PATH and do a search there. Jun 16, 2015 at 18:48
  • What problem are you trying to solve besides trying to locate files in specific directories?
    – Ramhound
    Jun 16, 2015 at 18:51
  • What do you mean by instances of a dll.. Given one particular file, you can't have more than one instance of it in a directory. Perhaps you mean how many dll files there are in the directory? Or do you just mean which directories have that one particular file?
    – barlop
    Jun 16, 2015 at 19:01
  • Yes Barlop - I mean to find each directory which contains a particular file. The use case is that I am trying to find and remove any duplicates of 'cygwin1.dll' that are in %PATH%. Jun 16, 2015 at 19:21

1 Answer 1

1

WHERE command:

Locate and display files in a directory tree.

The WHERE command is roughly equivalent to the UNIX 'which' command. By default, the search is done in the current directory and in the PATH.

You could use

where anyname.dll

You must log in to answer this question.

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