Moved logs to subfolder.

Moved creating wDayzManager logs to subfolder.
This commit is contained in:
2024-12-16 08:54:34 +03:00
parent 65c58da0f2
commit 35034f56c9
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# wDayzManager v0.2
# wDayzManager v0.3
# Copyright (c) 2024 Vladislav Salikov aka W0LF aka 'dreamforce'
# https://github.com/dreamforceinc
# Required module: PSIni
@@ -229,7 +229,7 @@ if ($rotateLogs) {
Write-Host "Removing old wDayzManager logs..."
$fileList = $null
$fileList = Get-ChildItem -Path $currentPath\*.log -Recurse | Where-Object { $_.LastWriteTime.Date -lt $date.AddDays( -3) }
$fileList = Get-ChildItem -Path $currentPath\Logs\*.log -Recurse | Where-Object { $_.LastWriteTime.Date -lt $date.AddDays( -3) }
# Write-Host $fileList -Separator "`n"
foreach ($file in $fileList) {
Remove-Item -Path $file