안녕하세요, IE 캐시에서 다른 곳으로 파일을 복사하려고합니다. 이것은 w7에서 작동하지만 Vista Ultimate에서는 작동하지 않습니다. 한마디로경고없이 PowerShell 복사가 실패합니다.
:
복사 항목 $ f를 -destination
(나는 또한 $ f.fullname 시도)
"$ TARGETDIR"-force전체 스크립트를
$targetDir = "C:\temp"
$ieCache=(get-itemproperty "hkcu:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders").cache
$minSize = 5mb
Write-Host "minSize:" $minSize
Add-Content -Encoding Unicode -Path $targetDir"\log.txt" -Value (get-Date)
Set-Location $ieCache
#\Low\Content.IE5 for protected mode
#\content.ie5 for unprotected
$a = Get-Location
foreach ($f in
(get-childitem -Recurse -Force -Exclude *.dat, *.tmp | where {$_.length -gt $minSize})
)
{
Write-Host (get-Date) $f.Name $f.length
Add-Content -Encoding Unicode -Path $targetDir"\log.txt" -Value $f.name, $f.length
copy-item $f -Destination "$targetDir" -force
}
지혜의 끝. 도와주세요!