问题描述
Windows 7 sp1上的Powershell 5.1引发以下错误:
摘要:
$Lstfile= @(Get-ChildItem 'G:\BACKUPS\' -Filter *.zip | sort LastWriteTime | select -last 1 )
错误:
Get-ChildItem : The given path's format is not supported.
At C:\DailyBackup.ps1:101 char:13
+ $Lstfile= @(Get-ChildItem "G:\BACKUPS\" -Filter *.zip | sort LastWrit ...
+ CategoryInfo : NotSpecified: (:) [Get-ChildItem],NotSupportedException
+ FullyQualifiedErrorId : System.NotSupportedException,Microsoft.PowerShell.Commands.GetChilditemcommand
目标是创建的最后一个备份文件的时间戳(使用过滤器“ * .zip”)。尝试了至少十二种不同的方法来导出最后修改的数据,所有方法均引发相同(或相似)错误“不支持给定路径的格式”
是的,“ G:\ Backups”确实存在。
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)