# How to store variables  to a custom .ini file?

**URL:** <https://forums.unrealengine.com/t/how-to-store-variables-to-a-custom-ini-file/330274>\
**Category:** Editor Scripting\
**Tags:** Variable, configuration, unreal-engine, CPP, question\
**Created:** [August 29, 2015, 6:16am UTC](https://forums.unrealengine.com/t/how-to-store-variables-to-a-custom-ini-file/330274 "2015-08-29T06:16:39Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [December 19, 2018, 9:42am UTC](https://forums.unrealengine.com/t/how-to-store-variables-to-a-custom-ini-file/330274/10 "2018-12-19T09:42:59Z")

</div>

For writing to custom ini file, instead of using one of the globals as file name (GGameIni etc), you need to pass in your file’s absolute path. For instance, if I want to save data in an ini called DefaultMyGame.ini stored in [Project]/Config, I’ll use as path `FPaths::ProjectConfigDir() / TEXT("DefaultMyGame.ini")`.

And for the section, it’s as others said: `/Script/YourProjectName.ClassName`  
If it is a plugin, it’ll be `/Script/ModuleName.ClassName`

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-store-variables-to-a-custom-ini-file/330274)._
