mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
resolve child path
This commit is contained in:
parent
d7d0f1320b
commit
5831fa4977
@ -51,7 +51,7 @@ function Flatten-Directory($name) {
|
|||||||
$name = Resolve-Path $name
|
$name = Resolve-Path $name
|
||||||
$moving = "$($name)_moving"
|
$moving = "$($name)_moving"
|
||||||
Rename-Item $name -NewName $moving
|
Rename-Item $name -NewName $moving
|
||||||
$child = (Get-Childitem $moving)[0]
|
$child = Resolve-Path (Get-Childitem $moving)[0]
|
||||||
Write-Verbose "Moving the '$child' directory to '$name'"
|
Write-Verbose "Moving the '$child' directory to '$name'"
|
||||||
Move-Item -Path $child -Destination $name
|
Move-Item -Path $child -Destination $name
|
||||||
Remove-Item -Recurse $moving
|
Remove-Item -Recurse $moving
|
||||||
|
Loading…
Reference in New Issue
Block a user