Announcement

Collapse
No announcement yet.

Searching for a file in root directory?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Searching for a file in root directory?

    I apologise if this has been answered previously, but I cant find any reference..

    How do i search for a file in the root folder of a hard disk? (either c:\ or d:\)

    I know how to perform a search that will scan the whole disk, or even the windows folder, but I cant fathom out how to point it solely to the root (I dont think there is an environment variable for this purpose??)

    The line below obviously searches for a file called file.doc in the windows directory.

    What do i replace the "c$\%windir%" with??

    cmd.exe /x /c dir \\%E%\c$\%Windir%\file.doc/s >>c:\output.txt &pause

  • #2
    Re: Searching for a file in root directory?

    To use that command, you would change it to:

    cmd.exe /x /c dir \\%E%\c$\file.doc >>c:\output.txt &pause

    Removing the %windir% and the /s should accomplish this for you.

    You can also use the new File/Directory exports in Exporter Pro (included with Hyena) to do this.

    Comment


    • #3
      Re: Searching for a file in root directory?

      Many thanks - i didnt even think of removing the /s switch

      With Exporter Pro, can you set it to show the machines that DONT have the files on clients (it works the other way around thankyou!)

      Comment


      • #4
        Re: Searching for a file in root directory?

        No, it will only write the computers that it finds the file on. You would have to export a computer list and compare the two.

        Comment


        • #5
          Re: Searching for a file in root directory?

          One workaround is to search for two files, one that you know exists (like a common Windows file that must be on the client) and then the file that you want to find. When you report your output, you will always have every computer represented that way.
          Kevin Stanush
          SystemTools Software Inc.

          Comment

          Working...
          X