Ветеран
Сообщения: 27449
Благодарности: 8087
|
Профиль
|
Отправить PM
| Цитировать
PowerShell:
читать дальше »
Код: 
$sSourceFolder = "C:\Песочница\044"
if(Test-Path -Path $sSourceFolder -PathType Container) {
Get-ChildItem -Path "$sSourceFolder\*.*" -Include "*.jpg" |`
ForEach-Object -Process {
$sDestPath = "$sSourceFolder\$($_.LastWriteTime.ToShortDateString())"
if(-not(Test-Path -Path $sDestPath -PathType Container)) {
New-Item -Path $sDestPath -Type Directory | Out-Null
}
Move-Item -Path $_.FullName -Destination "$sDestPath\" -Force
}
} else {
Write-Host "Can't find source folder [$sSourceFolder]" -ForegroundColor Red
}
|
Отправлено: 11:17, 13-05-2014
| #2
|