show message only if files exist

This commit is contained in:
jonas@geiger-natur.de
2025-01-05 17:19:16 +01:00
parent b6f36c62a0
commit ecc2d531eb

View File

@@ -40,6 +40,8 @@ while ($true) {
}
if($files.Count -gt 0)
{
#NOTIFICATION
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText02)
@@ -58,6 +60,7 @@ while ($true) {
$notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("DownloadsFileSync")
$notifier.Show($toast);
}
#START-SLEEP