mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-14 09:20:21 +08:00
add verbose message for flatten directory
This commit is contained in:
parent
800a4a953f
commit
d567229050
@ -49,6 +49,7 @@ function Create-Archive($source, $target, $params) {
|
|||||||
# Flatten it instead
|
# Flatten it instead
|
||||||
function Flatten-Directory($name) {
|
function Flatten-Directory($name) {
|
||||||
$child = (Get-Childitem $name)[0]
|
$child = (Get-Childitem $name)[0]
|
||||||
|
Write-Verbose "Moving the '$child' directory's content to '$name'"
|
||||||
Rename-Item $name -NewName "$($name)_moving"
|
Rename-Item $name -NewName "$($name)_moving"
|
||||||
Move-Item -Path "$($name)_moving\$child" -Destination $name
|
Move-Item -Path "$($name)_moving\$child" -Destination $name
|
||||||
Remove-Item -Recurse "$($name)_moving"
|
Remove-Item -Recurse "$($name)_moving"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user