我想將存盤在快速訪問中的所有路徑寫入文本檔案。使用普通檔案夾,這不是問題。但是快速訪問不是檔案夾,我不知道如何閱讀里面的內容。有人能幫我嗎?
uj5u.com熱心網友回復:
您可以為此使用 COM:
$shell = New-Object -ComObject Shell.Application
$paths = $shell.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items() | ForEach-Object { $_.Path }
# view on screen
$paths
# write to text file
$paths | Set-Content -Path 'X:\MyQuickAccessPaths.txt'
# don't forget to remove the used COM object from memory when done
$null = [System.Runtime.Interopservices.Marshal]::ReleaseComObject($shell)
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/426011.html
