# Writing Files over shared LAN folder

**URL:** <https://discourse.processing.org/t/writing-files-over-shared-lan-folder/2814>\
**Category:** Coding Questions\
**Created:** [August 21, 2018, 9:02am UTC](https://discourse.processing.org/t/writing-files-over-shared-lan-folder/2814 "2018-08-21T09:02:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KemyKo](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@KemyKo](https://discourse.processing.org/u/KemyKo)\
**Post date:** [August 21, 2018, 9:02am UTC](https://discourse.processing.org/t/writing-files-over-shared-lan-folder/2814/1 "2018-08-21T09:02:05Z")

</div>

The title says everything. I want to create and read files from my phone to my pc.

I created a folder in Documents/TestFolder  
Right Click -\> Properties -\> Share -\> Everyone(Read+Write).  
I am left with this: `//192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt`

I tried using createWriter(“see above”); from my pc and it successfully created the file. So i just guessed that it works from any pc connected to the same network.

But when i switched to the android version i got this:

`java.io.FileNotFoundException: /192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt (No such file or directory) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:287) at java.io.FileOutputStream.<init>(FileOutputStream.java:223) at java.io.FileOutputStream.<init>(FileOutputStream.java:171) at processing.core.PApplet.createWriter(PApplet.java:4863) at processing.core.PApplet.createWriter(PApplet.java:4853) at processing.test.bmw_mobile.BMW_Mobile.setup(BMW_Mobile.java:26) at processing.core.PApplet.handleDraw(PApplet.java:1846) at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516) FATAL EXCEPTION: Animation Thread Process: processing.test.bmw_mobile, PID: 17980 java.lang.RuntimeException: Couldn't create a writer for /192.168.0.94/Users/TeoV/Documents/Apps/FolderTestLan/txtTest.txt at processing.core.PApplet.createWriter(PApplet.java:4875) at processing.core.PApplet.createWriter(PApplet.java:4853) at processing.test.bmw_mobile.BMW_Mobile.setup(BMW_Mobile.java:26) at processing.core.PApplet.handleDraw(PApplet.java:1846) at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476) at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)`

How can i read and write files over LAN with the android mode?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 21, 2018, 2:17pm UTC](https://discourse.processing.org/t/writing-files-over-shared-lan-folder/2814/2 "2018-08-21T14:17:54Z")

</div>

Usually when I want to access data from my computer, I will use something like **shareit** or **pushbullet**. I know **shareit** will do the transfer over wifi. You need to install the app in both devices.

To consider, ip addresses in dynamic networks are not fixed. You also need to work with your firewall, so I understand from some posts. Follow the lead in the next links:

- [https://forums.androidcentral.com/google-nexus-10-tablet/248311-any-way-access-files-over-home-wireless-network.html](https://forums.androidcentral.com/google-nexus-10-tablet/248311-any-way-access-files-over-home-wireless-network.html)
- [https://stackoverflow.com/questions/14222219/access-local-network-files-with-android](https://stackoverflow.com/questions/14222219/access-local-network-files-with-android)
- [https://android.stackexchange.com/questions/42513/how-do-i-access-files-on-an-android-device-from-a-lan-connected-computer](https://android.stackexchange.com/questions/42513/how-do-i-access-files-on-an-android-device-from-a-lan-connected-computer)
- [www.tomsguide.com/faq/id-2334193/access-windows-shared-folder-android-smartphone.html](http://www.tomsguide.com/faq/id-2334193/access-windows-shared-folder-android-smartphone.html)

Notice that the solutions above do not offer you a solution to integrate data access from Processing Android. It only shows some ways to access files from the network. Related to `createWriter()`, I am going to guess and say the function calls under the hood are different for Processing Java and Android. You can dive into the source code and explore it yourself.

Kf
