none
Advanced Query Syntax NOT foldername (need to identify multiple folders)

    Question

  • I need to do a search on our web server for all .aspx files.  I need to exclude two different folders.  I can make the Advanced Query Syntax work with NOT foldername:folderexample1, but I can't figure out how to do NOT foldername:example1 AND NOT foldername:example2.

    It doesn't exclude the second folder.  I am on Windows 7.

    Thanks for ideas.


    There are no mistakes; every result tells you something of value about what you are trying to accomplish.


    • Edited by run4it Thursday, September 26, 2013 8:19 PM
    Thursday, September 26, 2013 8:18 PM

Answers

  • I need to do a search on our web server for all .aspx files.  I need to exclude two different folders.  I can make the Advanced Query Syntax work with NOT foldername:folderexample1, but I can't figure out how to do NOT foldername:example1 AND NOT foldername:example2.

    It doesn't exclude the second folder.  I am on Windows 7.

    Here you go:

    1. Open a Command Prompt.
    2. Type this command and press Enter:
      dir  /b  /s  q:\*.aspx  | find /i /v "Folder1" | find /i /v "Folder2" > "%UserProfile%\Desktop\ASPX.txt"
    3. Have a look at the file ASPX.txt on your desktop.

    Thursday, September 26, 2013 8:59 PM

All replies

  • I need to do a search on our web server for all .aspx files.  I need to exclude two different folders.  I can make the Advanced Query Syntax work with NOT foldername:folderexample1, but I can't figure out how to do NOT foldername:example1 AND NOT foldername:example2.

    It doesn't exclude the second folder.  I am on Windows 7.

    Here you go:

    1. Open a Command Prompt.
    2. Type this command and press Enter:
      dir  /b  /s  q:\*.aspx  | find /i /v "Folder1" | find /i /v "Folder2" > "%UserProfile%\Desktop\ASPX.txt"
    3. Have a look at the file ASPX.txt on your desktop.

    Thursday, September 26, 2013 8:59 PM
  • Awesome!  Thank you.


    There are no mistakes; every result tells you something of value about what you are trying to accomplish.

    Thursday, September 26, 2013 10:14 PM