add verbose message for flatten directory

This commit is contained in:
David Refoua 2022-10-14 21:46:00 +03:30 committed by GitHub
parent 800a4a953f
commit d567229050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,7 @@ function Create-Archive($source, $target, $params) {
# Flatten it instead
function Flatten-Directory($name) {
$child = (Get-Childitem $name)[0]
Write-Verbose "Moving the '$child' directory's content to '$name'"
Rename-Item $name -NewName "$($name)_moving"
Move-Item -Path "$($name)_moving\$child" -Destination $name
Remove-Item -Recurse "$($name)_moving"