diff --git a/Windows DVR/WindowsDVRCleanup.ps1 b/Windows DVR/WindowsDVRCleanup.ps1 index a9e852a..ca979e8 100644 --- a/Windows DVR/WindowsDVRCleanup.ps1 +++ b/Windows DVR/WindowsDVRCleanup.ps1 @@ -1,4 +1,4 @@ -$envFilePath = ".\env" +$envFilePath = ".\.env" if (Test-Path $envFilePath) { Get-Content $envFilePath | ForEach-Object { if ($_ -match "^(.*?)=(.*)$") { @@ -12,7 +12,7 @@ if (Test-Path $envFilePath) { exit } -$maxAge = [System.Environment]::GetEnvironmentVariable("MAX_AGE") +$maxAge = -([System.Environment]::GetEnvironmentVariable("MAX_AGE")) $outputPath = [System.Environment]::GetEnvironmentVariable("OUTPUT_PATH") # Get files older than MAX_AGE hours and delete them