Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sourcePath = 'C:\Users\steve\Desktop\New folder'
- Get-ChildItem $sourcePath -Recurse -Include '*.*' | Foreach-Object `
- {
- $target = -join($sourcePath,"\",$_.Extension.Substring(1))
- mkdir $target
- Move-Item $_ -Destination $target
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement