auto lo bridge0
iface lo inet loopback
iface enp6s0 inet manual
iface bridge0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports enp6s0
bridge_stp off
bridge_fd 0
auto enp6s0
iface enp6s0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports enp6s0
bridge_stp off
bridge_fd 0
Get-ChildItem "\\?\E:\Share\#Общая\IT\Раткин Роман\" -Recurse -Directory -ErrorAction SilentlyContinue | Object {$_.Name -match '\s+$'} | Item -NewName {$_.Name -Replace "\s+$","" }
$fileName = Get-ChildItem "D:\4out" -Recurse -Directory -ErrorAction SilentlyContinue | Where-Object {$_.Name -match '\s$'}
$newName = $fileName.Fullname.TrimEnd()
Rename-Item -Path $fileName.FullName -Destination $newName
Rename-Item : Cannot rename because item at 'E:\Share\#Общая\IT\test 213 ' does not exist.
At line:3 char:1
+ Rename-Item -Path $fileName.FullName -NewName $newName -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Rename-Item], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RenameItemCommand
$fileName = Get-ChildItem "E:\Share\#Общая\IT\" -Recurse -Directory -ErrorAction SilentlyContinue | Where-Object {$_.Name -match '\s$'}
$newName = $fileName.Fullname.TrimEnd()
gci : Не удалось найти часть пути "E:\Share\#Общая\IT\test 213".
At line:1 char:1
+ gci "E:\Share\#Общая\IT\" -Recurse -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ReadError: (E:\Share\#Общая...\test 213 :String) [Get-ChildItem], DirectoryNotFoundException
+ FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand