# Укажите путь к папке с фотографиями
$sourceFolder = "Путь_к_исходной_папке"
$files = Get-ChildItem -Path $sourceFolder -File
foreach ($file in $files) {
$newFolderPath = Join-Path -Path $sourceFolder -ChildPath $file.BaseName
New-Item -ItemType Directory -Path $newFolderPath -ErrorAction SilentlyContinue | Out-Null
Move-Item -Path $file.FullName -Destination $newFolderPath
}