Is there any chance to exclude folders from windows search with cmd?

Someone 0 Reputation points
2023-01-31T16:52:37.6433333+00:00

excludefolder

Hello, someone genius.

I really want to know this and make a batch file.

A batch file. So I need to know how to exclude folders from windows search with cmd.

At least I want to know if this is possible or not.

Thanks for your answer, genius.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,231 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,091 Reputation points
    2023-02-02T11:15:52.4633333+00:00

    Hi,

    Thank you for posting your query.

    Kindly follow the steps provided below to resolve your issue.

    To exclude a specific folder’s contents, along with subfolders and their contents, the path to that folder can be specified with a minus sign as in this example syntax:

    -folder:(C:\Users\Administrator\Desktop\chart graphing)

    If you know that the folder has a unique name within the full area that you are searching, then you can leave off most of the path, as in:

    -folder:(chart graphing)

    If you instead want to permit searching inside of subfolders of such a folder, while still excluding files that are immediately inside of that folder, then use:

    -foldername:(chart graphing)

    You can use multiple instances of the syntax to exclude more than one folder.

    Go to this link for your reference and other troubleshooting procedures https://answers.microsoft.com/en-us/windows/forum/all/how-do-exclude-folders-from-windows-search/58f845f6-d6fa-449e-a921-52be453038f1

    Do not hesitate to message us if you need further assistance.

    If the answer is helpful kindly click "Accept as Answer" and up vote it.

    0 comments No comments