# system.file.openFile default location not working

**URL:** <https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 25, 2018, 1:15pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606 "2018-06-25T13:15:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan.kobus](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dan.kobus](https://forum.inductiveautomation.com/u/dan.kobus)\
**Post date:** [June 25, 2018, 1:15pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606/1 "2018-06-25T13:15:31Z")

</div>

i am using the system.file.openfile function and i have a default file location setup.

path = system.file.openFile(’’,’\[mdkfs01.mdk.cosma.com](http://mdkfs01.mdk.cosma.com)\Modatek\Inter Department’)  
if path != None:  
event.source.parent.getComponent(‘Btn1 Link’).text = path

but it dosn’t seem to matter what you put as a default location because the browser always opens to documents.

is there something that i am missing?

---

<div class="post-metadata">

**Author:** ![ethomason](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ethomason/32/43338_2.png) [@ethomason](https://forum.inductiveautomation.com/u/ethomason)\
**Post date:** [June 25, 2018, 2:20pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606/2 "2018-06-25T14:20:00Z")

</div>

If the default location is not valid it opens to Documents. Is your path correct?

---

<div class="post-metadata">

**Author:** ![dan.kobus](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dan.kobus](https://forum.inductiveautomation.com/u/dan.kobus)\
**Post date:** [June 25, 2018, 2:39pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606/3 "2018-06-25T14:39:35Z")

</div>

yes that was the problem.

it doesn’t like the file server name. it wanted to see it as a drive

therefore it needed to be ‘M:\Inter Department’

---

<div class="post-metadata">

**Author:** ![dmdrendall](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dmdrendall](https://forum.inductiveautomation.com/u/dmdrendall)\
**Post date:** [August 1, 2018, 10:50pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606/4 "2018-08-01T22:50:11Z")

</div>

What’s the trick to pass a “null” to the optional extension argument of this function? I just want to direct the user to the directory, but would like the filetype to be “All Files”. Ran out of guesses. Closest i came was using \ but it just passes the path to the extension argument. Thought I was clever with [.], but no wax.

---

<div class="post-metadata">

**Author:** ![dmdrendall](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dmdrendall](https://forum.inductiveautomation.com/u/dmdrendall)\
**Post date:** [August 1, 2018, 10:54pm UTC](https://forum.inductiveautomation.com/t/system-file-openfile-default-location-not-working/18606/5 "2018-08-01T22:54:05Z")

</div>

NM, Tried _None_ and voila. Thanks anyway…still learning python.
