# Write file without user input

**URL:** <https://forum.inductiveautomation.com/t/write-file-without-user-input/12042>\
**Category:** Ignition\
**Created:** [August 16, 2016, 3:39pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042 "2016-08-16T15:39:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jado58](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jado58](https://forum.inductiveautomation.com/u/Jado58)\
**Post date:** [August 16, 2016, 3:39pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042/1 "2016-08-16T15:39:19Z")

</div>

I created an app that requires loading images and tie to part numbers, I have done so in SQL where the image is read and stored through system.file.readFileAsBytes(path), however I think its a better idea to save the images in a network drive and refrence the file location instead.  
system.file.writeFile(bytes, data) prompts the user for a location to save the file, is there a way to hard code the location where the file will be saved?

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [August 16, 2016, 3:56pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042/2 "2016-08-16T15:56:00Z")

</div>

Jado58

take a look here [https://docs.inductiveautomation.com:8443/display/DOC/system.file.writeFile](https://docs.inductiveautomation.com:8443/display/DOC/system.file.writeFile)

Just place the file name as the first parameter

system.file.writeFile(filepath, bytes)

---

<div class="post-metadata">

**Author:** ![ronaldny](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ronaldny](https://forum.inductiveautomation.com/u/ronaldny)\
**Post date:** [March 3, 2020, 5:56pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042/3 "2020-03-03T17:56:48Z")

</div>

Anyone with a way to go about this

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 3, 2020, 6:15pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042/4 "2020-03-03T18:15:24Z")

</div>

[https://docs.inductiveautomation.com/display/DOC80/system.file.writeFile](https://docs.inductiveautomation.com/display/DOC80/system.file.writeFile)

Same solution, updated link. You can present the file name/path to this and it will write it without a user prompt.

---

<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:** [March 3, 2020, 7:05pm UTC](https://forum.inductiveautomation.com/t/write-file-without-user-input/12042/5 "2020-03-03T19:05:38Z")

</div>

I think the OP was confusing `system.file.writeFile()` and `system.file.saveFile()`. The latter prompts.
