SHARE
TWEET

Untitled

a guest Nov 14th, 2019 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $sourcePath = 'C:\Users\steve\Desktop\New folder'
  2.  
  3. Get-ChildItem $sourcePath -Recurse -Include '*.*' | Foreach-Object `
  4.     {
  5.         $target = -join($sourcePath,"\",$_.Extension.Substring(1))
  6.  
  7.         mkdir $target
  8.         Move-Item $_ -Destination $target
  9.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top