Jump to content
View in the app

A better way to browse. Learn more.

Pulseway

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi,

I would like to have a folder monitor, basically I have a folder (or several folders) that I need to monitor that the files in the folder and receive alerts for the following.

- files are older than X days
- over X number of files in the folder

 

Please advise if this is possible currently of if this will require development, if this can be accomplished with a script then some pointers would be useful, ideally this would run at the same rate as other aspects of the system, but it could also be a daily/hourly check as I understand it could consume time processing!

 

  • Staff

Hi,

try to run these scripts:

Check if folder contines files older than 10 days.

$fullPath = "path to the folder"
$days = 10 # files older than 10 days

$files = @(get-childitem $fullpath -include *.* -recurse | where {($_.LastWriteTime -lt (Get-Date).AddDays(-$days)) -and ($_.psIsContainer -eq $false)})
if($files.length -gt 0){exit 1}
else{exit 0}

Check if folder contains more than 5 files

$fullPath = "path to the folder"
$count = 5 # check if folder containes more than 5 files

$files = @(get-childitem $fullpath)
if($files.Count -gt $count){exit 1}
else{exit 0}

 

  • Author

Thanks Chris, the script works fine, I can add some output to them, but it seems they require running manually? Is there a way to have scripts run at the same interval as other test, at the very least I would need to check hourly?

it would be great if this could be added in a similar format to the SSL so that multiple folders could be added with Alert times from 1 minute, happy to discus this offline.

I could do an automation script but there is not an option less than daily.

Many Thanks

  • 2 years later...

Any updates on this, also very interested as we have a few systems where monitoring the number of files or size of a queue folder would be very helpfull. As buildup means they are not being processed.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.