0

I'm using the following code to open a dialog box to a specific folder. It is currently displaying all .jpg files. How do I make it show all files?

path = system.file.openFile('jpg', 'J:\FULLSAIL\Historian')
if path != None:

enter image description here

martineau
  • 119,623
  • 25
  • 170
  • 301
PaulMc
  • 109
  • 11

2 Answers2

1

The documentation says that you can specify the file extension, for instance “jpg”.

Since it probably uses glob.glob function to filter the files list, you can try with “*” to have no filtering and get all the files.

The documentation also says that the extension is an optional parameter, so you can try:

system.file.openFile(r”J:\FULLSAIL\Historian”)
Laurent LAPORTE
  • 21,958
  • 6
  • 58
  • 103
0

Ignition's support team said to use the following script.

path = system.file.openFile(None,'J:\FULLSAIL\Historian')

I tested and it seems to work exactly like I was hoping. One note, the term None must be have the first N capitalized, I first tried none and the system did not recognize the cmd. Thank you all for your help.

PaulMc
  • 109
  • 11
  • I had to go back over this again and so far I think this to be the best way using Text Field Input in Ignition Designer – PaulMc Aug 29 '19 at 00:18