Skip to content

Commit

Permalink
Merge pull request #1 from simontims/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
simontims authored Jul 29, 2018
2 parents 0762d36 + b8ceaf1 commit 0a3b18e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions PS-Tools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function Move-Path {
param($sourceFile, $destinationPath)

if( -Not (Test-Path -Path $destinationPath ) )
{
Write-Host "Creating $destinationPath"
New-Item -ItemType directory -Path $destinationPath -Force | Out-Null
}
else
{
Write-Host "$destinationPath exists"
}

Write-Host "Moving $sourceFile to $destinationPath"
Move-Item -Path $sourceFile -Destination $destinationPath -Force
Write-Host "Done"
}

function Delete-EmptyDirectories {
param($folderName)
Write-Host "Deleting empty directories from $folderName"
dir $folderName -Directory -recurse | where {-NOT $_.GetFiles("*","AllDirectories")} | del -recurse
Write-Host "Done"
}

0 comments on commit 0a3b18e

Please sign in to comment.