Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Special Folders

Filesystem/IO

List Special Folders

by  bigoldbulldog  Posted    (Edited  )
Here's how to see special folders
Code:
# list special folders
[environment+specialfolder]::GetNames([environment+specialfolder])

# list specialfolders with folder identifier number - formatted for hex too!
[environment+specialfolder]::GetNames([environment+specialfolder]) | select @{e={[int][environment+specialfolder]$_}; n='Int'},@{e={[environment]::GetFolderPath($_)};n='Path'} | ft @{e={$_.int};f='x';l='Hex'},* -auto

# Clear Recent documents
Get-ChildItem $([environment]::GetFolderPath('Recent')) | Remove-Item
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top