# Windows 10 vs Windows 7 file explorer component different behavior?

**URL:** <https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 24, 2020, 12:31pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355 "2020-03-24T12:31:51Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [March 24, 2020, 12:31pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355/1 "2020-03-24T12:31:51Z")

</div>

I’ve been getting complaints from some clients of our program that our email screen which normally assists you in selecting attachments doesn’t work for some people. The common thread we’ve found is that they are all Windows 10 users, while all our Windows 7 users it works fine.

On the email window I have a “attach invoice” button that has a custom property that finds the folder path that should be selected. Pressing the attach invoice button runs this script

```auto
import app.email

event.source.parent.getComponent('Container_files').visible = 1
event.source.parent.getComponent('Container_files').in_type = "Email.Service"
explorer = event.source.parent.getComponent('Container_files').getComponent('File Explorer')
path = event.source.directoryLower
event.source.parent.getComponent('Container_files').getComponent('Text Field_filePath').text = path
app.email.scrollToPath(explorer, 15)		

```

where app.email.scrollToPath is this script

```auto
def scrollToPath(explorer, shift = 0):
#	explorer.setSelectedPath(path)
	view = explorer.getViewport().getView()
	path = view.getSelectionPath()
	row = view.getRowForPath(path)
	if (row+shift) <= view.getRowCount():
		row = row + shift
	view.scrollRowToVisible(row)

```

Is this something anyone else has noticed, or is a known issue? I can’t figure out why this is happening, the only thing that seems to determine it is Windows 10 vs 7.

A picture of it working on a windows 7 machine

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

And then for the same exact window/paramters, on a windows 10 machine

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/bf40fd538222238ed9e240cf2458d9e0edbbec0d.png)

These were also done with the same user credentials.

---

<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:** [March 24, 2020, 3:12pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355/2 "2020-03-24T15:12:43Z")

</div>

> [@bkarabinchak.psi](#):
>
> path = view.getSelectionPath()  
> row = view.getRowForPath(path)

These two lines would be my suspicion - are they mounted to the same drive letter in both cases? Is the root folder of the file explorer set up the same?

You could also try simplifying your `scrollToPath` method; there's a public method on the file explorer component:  
`public void expandSelectedPath(File selectedPathFile)`

You just need to:

```python
from java.io import File
filePath = File("someString")

```

---

<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:** [November 10, 2020, 5:55pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355/3 "2020-11-10T17:55:46Z")

</div>

This was a low priority ticket but finally got around to it. My script still does not work with windows 10

```auto
def scrollToPath(explorer, shift = 0, path="R:\\"):
	#	explorer.setSelectedPath(path)
	from java.io import File
	filePath = File(path)
	explorer.expandSelectedPath(filePath)
	view = explorer.getViewport().getView()
	path = view.getSelectionPath()
	row = view.getRowForPath(path)
	if (row+shift) <= view.getRowCount():
		row = row + shift
	view.scrollRowToVisible(row)

```

Any other things I can try with this?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 10, 2020, 6:30pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355/4 "2020-11-10T18:30:51Z")

</div>

Have you tried using an absolute path to the share instead of the mapped drive letter?

---

<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:** [November 10, 2020, 6:34pm UTC](https://forum.inductiveautomation.com/t/windows-10-vs-windows-7-file-explorer-component-different-behavior/33355/5 "2020-11-10T18:34:47Z")

</div>

With the IP address you mean? Yes I did.
