Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $USS_Folder = "D:\POBRANE"
- get-childitem | % {
- $file = $_.FullName
- $date = Get-Date ($_.CreationTime)
- $month = $date.month
- $year = $date.year
- $TARGETDIR = "$USS_Folder\$year\$month"
- if(!(Test-Path -Path $TARGETDIR )){
- New-Item -ItemType directory -Path $TARGETDIR
- }
- move-item $file $TARGETDIR
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement