# Alarm when a mapped drive fail

**URL:** <https://forum.inductiveautomation.com/t/alarm-when-a-mapped-drive-fail/67494>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 12, 2022, 12:45pm UTC](https://forum.inductiveautomation.com/t/alarm-when-a-mapped-drive-fail/67494 "2022-12-12T12:45:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [December 12, 2022, 12:45pm UTC](https://forum.inductiveautomation.com/t/alarm-when-a-mapped-drive-fail/67494/1 "2022-12-12T12:45:45Z")

</div>

Hi All,

Is there a way to make an alarm when a mapped drive fail to connect?

Thanks

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 12, 2022, 1:09pm UTC](https://forum.inductiveautomation.com/t/alarm-when-a-mapped-drive-fail/67494/2 "2022-12-12T13:09:20Z")

</div>

I made one recently. You mean a gateway mapped drive?

I setup a gateway timer script that does a `os.path.exist('P:)` and then emails me (I'm the main developer) if it returns false.

If you mean you want to do it through the normal tag configuration and alarming, then you could probably do it with a expression tag. You should still write a function like

```auto
def checkMappedDriveConnection():
    import os
    return os.path.exists("P:")

```

and then in your expression tag  
`runScript('someLibrary.checkMappedDriveConnection', 10000)`, where 10000 is the polling rate in milliseconds. This will return true or false and then you can set up some alarm pipeline for when it turns false. I have not done it this way but I don't see why it would not work.

I used `P:` in my examples but use whatever mapped drive letter your's is.

---

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [December 12, 2022, 5:29pm UTC](https://forum.inductiveautomation.com/t/alarm-when-a-mapped-drive-fail/67494/3 "2022-12-12T17:29:32Z")

</div>

Hi bkarabinchak.psi,

Great mate! I think it will work. I'll let you know when I get it done.

Thanks a lot!
