- if($keepBackupsCount -eq -1) {
- Write-Output "Deleting backup $($_.FullName)"
- #Write-Log "Deleting backup $($_.FullName)"
+ if($keepFilesCount -eq -1) {
+ Write-Output "Deleting file $($_.FullName)"
+
+ if($null -ne $LogFile) {
+ Write-Log "Deleting file $($_.FullName)" -Path $LogFile
+ }