INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

E-mail*
Handle

Password
Verify P'word
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Member Feedback

"...This is easily the most helpful website I've ever used, and this is the best forum with the quickest response time bar none...."

Geography

Where in the world do Tek-Tips members come from?

PowerShell (Microsoft) FAQ

Filesystem/IO

List Special Folders
Posted: 18 Apr 07

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

Back to PowerShell (Microsoft) FAQ Index
Back to PowerShell (Microsoft) Forum
My FAQ Archive
Email This FAQ To A Friend

My Archive