# Where does saveTable save?

**URL:** <https://discourse.processing.org/t/where-does-savetable-save/16220>\
**Category:** Beginners\
**Created:** [December 7, 2019, 2:44pm UTC](https://discourse.processing.org/t/where-does-savetable-save/16220 "2019-12-07T14:44:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yes](https://avatars.discourse-cdn.com/v4/letter/y/ea5d25/32.png) [@yes](https://discourse.processing.org/u/yes)\
**Post date:** [December 7, 2019, 2:44pm UTC](https://discourse.processing.org/t/where-does-savetable-save/16220/1 "2019-12-07T14:44:05Z")

</div>

Does anybody know where save table saves?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 7, 2019, 2:58pm UTC](https://discourse.processing.org/t/where-does-savetable-save/16220/2 "2019-12-07T14:58:58Z")

</div>

By default it saves at **sketchPath()**:  
[Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#sketchPath--](http://Processing.GitHub.io/processing-javadocs/core/processing/core/PApplet.html#sketchPath--)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [December 8, 2019, 6:49am UTC](https://discourse.processing.org/t/where-does-savetable-save/16220/3 "2019-12-08T06:49:05Z")

</div>

but there is a data path preferred for processing use,

> **[loadTable() / Reference](https://processing.org/reference/loadTable_.html)**
>
> Reads the contents of a file or URL and creates a Table object with its values. If a file is specified, it must be located in the sketch's "data" folder. The filename parameter can also be a URL to a …

> **[saveTable() / Reference](https://processing.org/reference/saveTable_.html)**
>
> Writes the contents of a Table object to a file. By default, this file is saved to the sketch's folder. This folder is opened by selecting "Show Sketch Folder" from the "Sketch" menu. Alter…

besides there is some nice trick that processing even look  
into sketch path AND data path for reading,  
THIS does not work for writing, so lets ignore that feature and make some clean code:

```auto
String infile = "data/myCSV.csv"; // make sure there is a /data/ sub-directory with that file
String outfile = "data/myNewCSV.csv"; // this even could create that sub-directory if not exists

Table table = loadTable(infile,"header");
//... work on it
saveTable(table, oufile);

```

* * *

now a more general answer to your question

> Where does saveTable save

would be:  
to the specified path/filename ( if have write access )  
but again, best is to use the sketchpath/data/ directory
