# Access file from Windows environment

**URL:** <https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 15, 2024, 6:34am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208 "2024-07-15T06:34:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vani161998](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vani161998](https://forum.inductiveautomation.com/u/vani161998)\
**Post date:** [July 15, 2024, 6:34am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/1 "2024-07-15T06:34:39Z")

</div>

Hi,  
My ignition server is hosted in Linux environment. I want to access a text file which is in windows platform. Can someone suggest what are the points needs to done to access the file and read the content.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [July 15, 2024, 7:56am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/2 "2024-07-15T07:56:37Z")

</div>

What modules are in play? Is this being done though Vision, Perspective, or some other ignition means?

---

<div class="post-metadata">

**Author:** ![vani161998](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vani161998](https://forum.inductiveautomation.com/u/vani161998)\
**Post date:** [July 15, 2024, 10:18am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/3 "2024-07-15T10:18:28Z")

</div>

i need to write a script in script library to read the file and store in tag.  
But before that how to connect the windows environment and linux environment to get the file.  
the file is generated in windows PC and ignition is installed in Linux.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [July 15, 2024, 11:42am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/4 "2024-07-15T11:42:49Z")

</div>

OK... so you have a file that is hosted in a Windows environment, that you want your gateway to access?

And once you access the file, then you will read that file in a script and then put the data into a tag?

First... you will need to get your permissions setup correctly between the linux system and the windows system so you can access the file.

Then, based on the file type, you could use the [system.file | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-file) scripting functions to access that file using the full UNC path to that file to access it across your network.

---

<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:** [July 15, 2024, 12:31pm UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/5 "2024-07-15T12:31:13Z")

</div>

> [@vani161998](#):
>
> connect the windows environment and linux environment

Is the Windows system standalone (not a domain member) ? If so, you should be able to mount a Windows shared folder in Linux using the `cifs` mount type. If your system will do this regularly, consider using Linux's `autofs` toolkit to perform this mount on demand.

If the Windows system **is** a domain member, the simplest path forward is to have a special user name added to the domain that has permissions in the target windows system. Then you can use the techniques above. If you must, you can install the `samba4` tools on Linux and then join the Linux system to the domain. (I haven't done this in years--I don't give Windows such control over my Linux systems.)

Consider working in the opposite direction, where the Windows system actively **gives** the file to the Linux system at the desired pace/schedule. This can be handled in Ignition with the WebDev module, or you can use Linux's `samba4` toolkit to expose a file share (in Linux) to other Windows system. Then the Windows system would copy the file to Linux on schedule, and Ignition could then read the file locally.

---

<div class="post-metadata">

**Author:** ![vani161998](https://avatars.discourse-cdn.com/v4/letter/v/ee7513/32.png) [@vani161998](https://forum.inductiveautomation.com/u/vani161998)\
**Post date:** [July 18, 2024, 8:13am UTC](https://forum.inductiveautomation.com/t/access-file-from-windows-environment/93208/6 "2024-07-18T08:13:17Z")

</div>

Thank you @pturmel
