title: How to get all files in a StorageFolder in Windows Phone Runtime?
body: <p>I want to get all files in a folder and its sub folders. but a flat query like this:</p>
  
  <pre><code>var allFiles = await myFolder.GetFilesAsync(Windows.Storage.Search.CommonFileQuery.OrderByName);
  </code></pre>
  
  <p>throws a <code>ArgumentException</code> exception:</p>
  
  <blockquote>
    <p>A first chance exception of type 'System.ArgumentException' occurred</p>
    
    <p>Additional information: Value does not fall within the expected range.</p>
  </blockquote>
  
  <p>before I query subfolders one by one, isn't there any other way?</p>