First, determine the File Explorer address of your document library.
- Check to see if the 'webclient' service is running:
- Click on 'Start', 'Run', and type: services.msc
- Scroll down and make sure you see 'WebClient' is there and started. If not, get Googling or use the following link (for Windows Server 2012+) https://camerondwyer.wordpress.com/2014/11/12/how-to-installenable-the-webclient-webdav-service-on-windows-server-2012-to-openedit-sharepoint-files/
- Copy the SharePoint document library URL and paste it to your local text editor.
- SharePoint URL example: http://sharepoint.url.com/site/Your_Site_Name/Sub_Site/SharedDocuments/
- Drop the "http:" from the URL
- Switch all of the "/" to "\", so your folder location looks like this:
- \\sharepoint.url.com\site\Your_Site_Name\Sub_Site\SharedDocuments\
- Copy this new address, click on 'Start', then 'Run', paste the new location text, then click 'OK'.
- You may have to play around with the location name, but once you get it, Explorer will open up and you will see the folders and/or the documents in that Share Documents directory.
Second, using PowerShell, determine the most-up-to-date file and copy it.
$dir = "\\sharepoint.url.com\WWWRoot\site\Site_Name\Sub_Site\SharedDocuments\Folder_1\Sub_Folder_1\File_Name*"
$latest = Get-ChildItem -Path $dir | Sort-Object LastAccessTime -Descending | Select-Object -First 1
$latest.name
$fromfile = "\\sharepoint.url.com\WWWRoot\site\Site_Name\Sub_Site\SharedDocuments\Folder_1\Sub_Folder_1\"+$latest.name
$tofile = "c:\temp\YOURE_FILE.xlsx"
Copy-Item $fromfile $tofile
- If you know part of the file name, your can put that at the end of the directory ($dir) location and add a "*" for a wildcard search.
No comments:
Post a Comment