# Opening File Explorer on Client PC

**URL:** <https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 8, 2022, 11:01pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408 "2022-12-08T23:01:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Hook](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Steve\_Hook](https://forum.inductiveautomation.com/u/Steve_Hook)\
**Post date:** [December 8, 2022, 11:01pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/1 "2022-12-08T23:01:10Z")

</div>

Hello! I am trying to have a button in a perspective window open to a specific file explorer folder on the client pc. I have tried a few different solutions including system.util.execute and python library subprocess but haven't been able to get either to work. No errors are thrown but no explorer windows open either.

Whats the best way to open file explorer on the client PC from Ignition perspective?

Thanks!

Here is an example. This works as expected in script console and opens up File Explorer to the correct directory. When I try to implement on a button in a view, nothing happens:

import subprocess  
subprocess.Popen(r'explorer /open,"C:\Test"')

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 9, 2022, 12:13am UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/2 "2022-12-09T00:13:23Z")

</div>

It is unlikely you are going to be able to get this to work. All scripts in Perspective run on the gateway and do not have access to the filesystem on the client computer.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 9, 2022, 12:33am UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/3 "2022-12-09T00:33:17Z")

</div>

@mcgheeiv is correct.

In Perspective, if you need a client to upload a file, use the [File Upload Component](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+File+Upload).

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 9, 2022, 1:37am UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/4 "2022-12-09T01:37:40Z")

</div>

> [@Steve\_Hook](#):
>
> open file explorer on the client PC from Ignition perspective?

You cannot. Browsers do not permit this.

If you use Vision instead of Perspective, it is trivial.

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [January 9, 2025, 8:00pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/5 "2025-01-09T20:00:26Z")

</div>

In vision how is this done? Trying to bring up a file that's located in file explore. I want to do that by using a symbol in the symbol factory and using the component scripting for a mouse click to do that.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 9, 2025, 8:05pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/6 "2025-01-09T20:05:59Z")

</div>

> **[system.file.openFile | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-file/system-file-openFile)**
>
> Shows an "Open File" dialog box, prompting the user to choose a file to open.

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [January 9, 2025, 8:17pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/7 "2025-01-09T20:17:24Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/5/f5cc9ad52e580d742dd255ea38385b6f79c1e804.png)

This is what im getting in return a error......

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [January 9, 2025, 8:21pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/8 "2025-01-09T20:21:19Z")

</div>

Remove the containing square brackets, enclose your path in `"`, and since this is python, you'll need to escape your backslashes using another `\`, or use forward slashes instead.

All together your first line should be something like

```python
path = system.file.openFile(
	"G:\\DeptDrive\\awhs\\ASRS MAINTENANCE\\Archive\\ASRS M..."
)

```

or the better(proper) way:

```python
path = system.file.openFile(
	"G:/DeptDrive/awhs/ASRS MAINTENANCE/Archive/ASRS M..."
)

```

If you scroll further down in the manual link that Kevin provided you should see example code.

Also, when posting code, please post it as formatted text, see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). It makes it easier for others to copy/test code instead of having to read off a picture and manually retype it.

As a warning, if this is a shared network drive you should be using full UNC paths instead of the mapped drive letter.

> [@Mapping network drive confusion](https://forum.inductiveautomation.com/t/mapping-network-drive-confusion/88338/32):
>
> Also be aware that if your target share is not available when Ignition is restarted, Ignition will take longer to start up, due to those retries. And if your target share ever disconnects, it won't reconnect until you restart the Ignition service. Using the service wrapper's drive mapping ability is not fit for production use. Full stop.

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [January 9, 2025, 8:45pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/9 "2025-01-09T20:45:39Z")

</div>

Awesome thanks all!!!! Does this have the capability to open a PLC program that located in the file destination that was just created??

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [January 9, 2025, 8:46pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/10 "2025-01-09T20:46:06Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80bea6682de7e55e17ea63fef755dac7a9e03c52.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2025, 8:48pm UTC](https://forum.inductiveautomation.com/t/opening-file-explorer-on-client-pc/67408/11 "2025-01-09T20:48:48Z")

</div>

`system.net.openURL` would probably work provided your OS is already set to associate .ACD files with whatever PLC program:

> **[system.net.openURL | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-net/system-net-openURL)**
>
> Opens the given URL or URI scheme outside of the currently running Client in whatever application the host operating system deems appropriate.
