get-childitem D:\test | Rename-Item -NewName {$_.Name -replace '[^a-zA-Zа-яА-Я0-9.,-]',''}
$ListFiles=(GET-WMIOBJECT -query "SELECT * from win32_logicaldisk" | Foreach-Object {if (test-path $_.DeviceID.Tostring()) {Get-ChildItem -Path ($_.DeviceId.ToString()+"\") -Recurse -Filter *.txt} })
[System.Collections.ArrayList]$a = (Get-ChildItem d:\test\data -Directory | sort Name -Descending)
$a.RemoveRange(0,3)
ForEach ($v in $a) {Remove-Item d:\test\data\$v}