a guest Nov 14th, 2019 111 Never
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
RAW Paste Data