$searchfolder = "j:\1"
$storefolder = "j:\2"
New-Item $storefolder -ItemType Directory -ErrorAction SilentlyContinue -Force
Get-ChildItem $searchfolder -File -Recurse | %{
$newpath = Join-Path $storefolder -ChildPath $_.BaseName
New-Item $newpath -ItemType Directory -ErrorAction SilentlyContinue -Force
Move-Item -LiteralPath $_.FullName -Destination $newpath
}