I didn't say link multiple to one. Create multiple links in a single new folder each with its own name.
c:\mylinks
c:\mylinks\desktop => link to user desktop
c:\mylinks\documents => link to user documents
c:\mylinks\pictures => link to user pictures
… etc ...
Count of Files
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- apowershelluser
- Posts: 194
- Last visit: Mon Apr 15, 2024 3:21 pm
- apowershelluser
- Posts: 194
- Last visit: Mon Apr 15, 2024 3:21 pm
Re: Count of Files
whoops, sorry about that. I've confirmed this works as expected and will update once I get robocopy to count/copy folders in one command.
- $user = 'USERNAME'
- $Folders = @(
- #Destkop
- "C:\users\$user\Desktop"
- #Documents
- "C:\users\$user\Documents"
- #Downloads
- "C:\users\$user\Downloads"
- #Favorites
- "C:\users\$user\Favorites"
- #Links
- "C:\users\$user\Links"
- #Music
- "C:\users\$user\Music"
- #Pictures
- "C:\users\$user\Pictures"
- #Videos
- "C:\users\$user\Videos"
- )
- foreach ($Folder in $Folders){
- $Link = Split-Path $folder -Leaf
- cmd /c mklink /d C:\Windows\temp\Link\$link $Folder
- }