title: How can I order folders and files based on the SharePoint file path in an Excel file?
body: <p>I have a SharePoint site with folders, sub-folders, and files. I am trying to create a file directory to help people know where certain files are and what they are. I can easily download the folder/file directory from SharePoint which includes folder/file name, date modified, last modified by, type (folder or file) and the file path. Unfortunately, when you download the directory, it does not keep them in parent-child order.</p>
  <p>Is there a way to easily sort the list using the file path so that I get a list in the correct folder / sub-folder / file order? If there is a way to do this directly in the download from SharePoint, that would be even better but I've looked everywhere and it doesn't seem to be an option.</p>
  <p><strong>Example of Current Output</strong></p>
  <ol>
  <li>/Bob's Folder/Project Management</li>
  <li>/Bob's Folder/Deliverables</li>
  <li>/Bob's Folder/Calendar</li>
  <li>/Bob's Folder/Project Management/Project Banana</li>
  <li>/Bob's Folder/Deliverables/Week 1</li>
  <li>/Bob's Folder/Project Management/Project Banana/Project Plan</li>
  <li>/Bob's Folder/Deliverables/Week 1/Best Deliverable Ever</li>
  </ol>
  <p><strong>Example of Desired Output</strong></p>
  <ol>
  <li>/Bob's Folder/Project Management</li>
  <li>/Bob's Folder/Project Management/Project Banana</li>
  <li>/Bob's Folder/Project Management/Project Banana/Project Plan</li>
  <li>/Bob's Folder/Deliverables</li>
  <li>/Bob's Folder/Deliverables/Week 1</li>
  <li>/Bob's Folder/Deliverables/Week 1/Best Deliverable Ever</li>
  <li>/Bob's Folder/Calendar</li>
  </ol>