You may also be interested in: SharePoint Apps by Cybozu
Editor's note: Contributor Dean Virag is a Technical Trainer for ASCD. Follow him @techtrainerdean
Author's Note: Below is a how-to article that I wrote for a lawyer in NYC. He needed to find all documents in a document library that were created between two dates and then move them out of SharePoint and back into a networked file share.
So, he first contacted a prominent SharePoint consulting company there in NYC who said that the problem could only be handled through custom code. Then, after reading one of my posts on EUSP, he contacted me. I was able to solve his problem in about 10 minutes – using nothing but out-of-the-box functionality. It took more time for me to create this how-to article than it did to come up with the solution.
So the first part of this article is about creating a view that displays documents that were created between two different dates. The second part covers the same thing, only using Windows Explorer (in Windows 7) instead of SP.
He followed the second part and was able to get the files out of SharePoint that he needed. In the end, I did not charge him for my time (about an hour total) and I saved him from wasting thousands of dollars on a custom solution when one was not necessary.
Finding and aggregating files stored in folders in a document library can be a nightmare, especially when you are talking about thousands of files. The problem grows when you throw in the need to display only files that were created between two dates.
But, do not fear good SharePoint citizen! There is an easy solution to your problem, one that requires no coding and can be accomplished in a short amount of time – and here it is.
Solution 1: Display Files in a SharePoint Library View.
- Go to your document library.
- Click the Library Tools à Library tab.
- Click the Create View.
- Click Standard View.
- Give your view a name.
- Select the columns that you want to include in the view. Make sure that Created is checked. Note: Created is the date that the document was added into SharePoint.
- Optional: Select a value or values to sort your view results. For example, you could choose to sort by created date displayed in descending order. The documents created most recently would be displayed at the top of the list.
- Add the date range to filter the results.
- In the Filter group, click the Show items only when the following is true option.
- Select to show files where Created is greater than or equal to your desired start date. In this case we want to show all files created after September 11, 2011.
- Select and.
- Select to show the files where Created is less than or equal to [Today].
Note: [Today] is a dynamic variable that will automatically use the current date.
- In the Folders group, select to Show all items without folders.
- In the Item Limit group, increase the Number of items to display. In this example, the view will return the documents in batches of 100 files.
- Click OK to save and display your view.
- A flat list of files that were created between a range of dated will be displayed in the view. However, SharePoint does not make it easy to do things like copy or move multiple files. For that, we need to use Windows Explorer!
Solution #2: Filter and Display the Files Using Windows Explorer
- Go to your document library.
- Click the Library Tools -> Library tab.
- Click the Open With Explorer button to display the contents of the document library in Microsoft Windows Explorer.
- Right-Click in the column header section of Windows Explorer, and select Date Created. That will add the Date Created column to Windows Explorer.
- Roll your cursor over the Date Created column header and click the down triangle that appears.
- A calendar will appear under the down triangle. Click the left triangle to navigate back to the month/year that you want to start filtering the files.
- Once you have reached the desired month/year. Click the exact date that to begin filtering your documents and drag your cursor down to the bottom of the calendar without releasing the mouse click. Continue to move the cursor down to go into the next most recent month. Be careful, the selector moves fast! You might have to try it a couple of times to get the hang of it.
Click on Sept 11, 2012….
And drag downward to select into October. Stop on the desired date.
- The files that were created between the selected date range will be automatically displayed, but in their folders. To view all the files outside of their folders, click the Search again in: Subfolders.
- The display will update to show all the folders at the top of the list and all the documents below the folders.
Note: A Folder column will automatically be added to show which folder each document came from.
- You can now select all the files and copy them into a new location outside of SharePoint, such as a directory on your C drive, or a network shared drive.
- Repeat this process in all libraries where you want to filter files by date range.
- Paste all the desired files into the same folder.
Congratulations, you have successfully filtered files based on a date range in both a SharePoint Document Library and Windows Explorer.