# How to name a save?

**URL:** <https://discourse.processing.org/t/how-to-name-a-save/17753>\
**Category:** Beginners\
**Created:** [February 11, 2020, 9:05pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753 "2020-02-11T21:05:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadMarines](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@MadMarines](https://discourse.processing.org/u/MadMarines)\
**Post date:** [February 11, 2020, 9:05pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753/1 "2020-02-11T21:05:35Z")

</div>

Hi !, I’m a french student (excuse my english), and I have a problem… 😭

I make a game levels creator and I want to give a name at the save, I know how to save but I don’t know how a can give a name at them.

I will want to create a folder named “level” and in that folder, put the different level who I have maked.

the command who I current use is " saveStrings( “level/level\_1.txt”, board")"…  
[board is the name of the board with all my level’s informations.]

So, I need help for give different name to every saves 😅

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 11, 2020, 9:10pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753/2 "2020-02-11T21:10:18Z")

</div>

Hello,

Try this:

> [@Renaming PDF generated files](https://discourse.processing.org/t/renaming-pdf-generated-files/16164):
>
> Unable to find the answer to this in REFERENCE section. I have a very simple program to generate random color block overlaps. Currently set up to record a PDF of each instance when code runs. How do I generate a new name for the PDF each time code is run (otherwise it’s the same file name each time and overwrites the previous PDF file)? CURRENT CODE BELOW: import processing.pdf.\*; float randomH1 = random(300, 400); void setup() { size (400, 600); noLoop(); beginRecord(PDF, "filenam…

---

<div class="post-metadata">

**Author:** ![MadMarines](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@MadMarines](https://discourse.processing.org/u/MadMarines)\
**Post date:** [February 11, 2020, 9:36pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753/3 "2020-02-11T21:36:47Z")

</div>

Thanks, it was exactly what I search…

But this program create a PDF… Do you know how to do the same thing with a .txt ?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 11, 2020, 9:46pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753/4 "2020-02-11T21:46:20Z")

</div>

> [@MadMarines](#):
>
> Do you know how to do the same thing with a .txt ?

Yes.

Look at the example here:

> **[saveStrings() / Reference](https://processing.org/reference/saveStrings_.html)**
>
> Writes an array of Strings to a file, one line per String. By default, this file is saved to the sketch's folder. This folder is opened by selecting "Show Sketch Folder" from the "Sketch" menu. \<…

And apply to your code.  
I would start with something simpler.  
Look up all the references related to the other post to understand what it is doing.

’ 🙂 ’

Additional references:  
[year() / Reference / Processing.org](https://processing.org/reference/year_.html) Also look at related ones.  
[nf() / Reference / Processing.org](https://processing.org/reference/nf_.html)  
[+ (addition) / Reference / Processing.org](https://processing.org/reference/addition.html)  
[Characters Strings / Examples / Processing.org](https://processing.org/examples/charactersstrings.html)

---

<div class="post-metadata">

**Author:** ![MadMarines](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@MadMarines](https://discourse.processing.org/u/MadMarines)\
**Post date:** [February 11, 2020, 10:02pm UTC](https://discourse.processing.org/t/how-to-name-a-save/17753/5 "2020-02-11T22:02:38Z")

</div>

Thank you so much for your help 😉
