We have a document library (Shared Documents) that consists of a number of folders, sub-folders, and documents. For example:

Shared Documents\2005
Shared Documents\2005\1
Shared Documents\2005\1\Document1.docx
Shared Documents\2005\1\Document2.docx
Shared Documents\2005\1\Document3.docx
Shared Documents\2005\2
Shared Documents\2005\2\Document1.docx
Shared Documents\2005\2\Document2.docx
Shared Documents\2005\2\Document3.docx
Shared Documents\2006
Shared Documents\2006\1
Shared Documents\2006\1\Document1.docx
Shared Documents\2006\1\Document2.docx
Shared Documents\2006\1\Document3.docx
... and so on

The system is essentially a reports based system that automatically uploads the Documents to the relevant year/month folder. This runs outside of SharePoint but uses the SharePoint API to do this. The process also creates the folder hierarchy for the document if it does not exist.

When the user views the documents, they navigate by clicking on the Shared Documents, then the year, then the month to get to the document(s) they want to see. Due to the sheer volume of reports created, they want to see the latest reports at the top.

We have tried setting the Sort Order to Modified (Date) descending for the entire Library. This displays the modified documents nicely at the top, however we want to do the same for the folders - in the way where a child document has been added to a folder, that folder should appear at the top of the list. For example, if a Document was uploaded for March 2008, then the folder for 2008 should appear at the top under Shared Documents, and 3 (March) should appear at the top of the list under the 2008 folder.

Is this possible?

1 Answer 1


When you add a file to a folder, the folder itself is not modified. You should design your system to modify a hidden property of the folder after uploading the file so that the modified date of the folder is updated in sharepoint. Then your sorting will work.


  • Would this affect the Modified Date of all children folders and files? We have seen where you change the ordering on a View and all of the Modified Dates change on all folders and documents.
    – Andez
    Feb 11, 2014 at 11:41
  • Hi, I am not sure I understand... changing a view will not affect the properties of an item it will only change how the data is displayed.
    – user23429
    Feb 11, 2014 at 14:00
  • To clarify my example, if you are adding a file to the folder Shared Documents/2005/2 you will need to instruct the system to modify the 2005 folder and also the 2 folder. I think though before you implement this you should test this as I have a feeling displaying data in the way you are planning may be confusing to users.
    – user23429
    Feb 11, 2014 at 14:03
  • Sorry. We renamed a folder - not the View as I stated. When the folder was renamed, all of the child folder and file date time stamps changed also.
    – Andez
    Feb 11, 2014 at 14:53
  • Hi Andez, this is very strange behaviour... Each folder is an item in itself so its modified date applies only to itself and nothing else. I just performed a test where I changed the name of a folder. The modified date of the folder was updated, but the files within it still have their original modified dates...
    – user23429
    Feb 11, 2014 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.