I am developing a WPF application, I am trying to get files consuming large storage in the system.I want to achieve programmatically the below:

open windows search ,
Type size:gigantic ,
get the files listed into the application

[![enter image description here](https://i.stack.imgur.com/igSmx.png)](https://i.stack.imgur.com/igSmx.png)

I tried the below code:

```
public void GetFiles( )
        {
            string connectionString = "Provider=Search.CollatorDSO;Extended Properties=\"Application=Windows\"";
            OleDbConnection connection = new OleDbConnection(connectionString);

            string query = @"SELECT System.ItemName FROM SystemIndex " +
               @"WHERE scope ='file:" + @"C:\" + "' and FREETEXT('size:gigantic')";
            OleDbCommand command = new OleDbCommand(query, connection);
            connection.Open();

            List<string> result = new List<string>();

            OleDbDataReader reader = command.ExecuteReader();
            while (reader.Read())
            {
                result.Add(reader.GetString(0));
            }

            connection.Close();
        }

```