我只是好奇,我有没有可能从SharePoint文档库下载这个文件?
问题是我在这个库中有3-4个文件,我需要获取最新修改日期的文件。
提前谢谢你。
发布于 2015-07-29 00:44:30
请参考下面的链接,但不要使用目录的实际SharePoint URL,而要使用SharePoint站点的文件资源管理器地址。
Powershell脚本:
$dir = "\\sharepoint.domain.com\site\Foo\SubFoo\SharedDocuments\Folder\"
$latest = Get-ChildItem -Path $dir | Sort-Object LastAccessTime -Descending | Select-Object -First 1
$latest.name要获取资源管理器的位置,右键单击SharePoint中的文件链接,(Firefox的“复制链接位置”,IE的“属性”)。
复制URL:http://sharepoint.domain.com/site/Foo/SubFoo/SharedDocuments/Folder/
将其格式更改为:\\sharepoint.domain.com\site\Foo\SubFoo\SharedDocuments\Folder\
验证链接是否有效:单击“开始”-->“运行”-->粘贴更改后的链接并运行。它应该会打开SharePoint文件夹。
PowerShell代码来自这个站点。
也给他们检查一下:How to find newest file in directory using PowerShell script?
https://stackoverflow.com/questions/28946557
复制相似问题