Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Help with simple script to remove subfolders from directory structure

$
0
0

I am trying to clear the ‘Downloads’ folder from all of our user profiles, the structure is:

\\server\share\UPMProfiles\username1\UPM_Profile\Downloads
\\server\share\UPMProfiles\username2\UPM_Profile\Downloads
\\server\share\UPMProfiles\username3\UPM_Profile\Downloads
\\server\share\UPMProfiles\username4\UPM_Profile\Downloads

I can’t figure out how to empty the contents of the ‘Downloads’ folder from user profiles without having a separate line for each different username..

Batches like del “\\server\share\UPMProfiles\*\UPM_Profile\Downloads” don’t work.

Any suggestions would be greatly appreciated.

Thanks


Viewing all articles
Browse latest Browse all 13067

Trending Articles