In today’s world, we are constantly interacting with different types of software. Whether it be on our computer or phone, there is an application for everything. While some applications come pre-installed on our devices, others need to be downloaded and installed manually. In this blog post, I will show you how to make an ini file using notepad.

How To Make ini File in Notepad

Before we can begin making an ini file, we have to download a notepad application. A simple Google search will provide you with many different options for this. Once you’ve found one, install it on your computer and open it up. Now that we have a notepad application ready to go, the first thing we need to is create a file to store our information in. This means going to the File tab at the top left hand corner of notepad and selecting “New”.

Once you create this first file, it should open up a blank document for you to type your desired settings into. The first setting we will want to include is titled “test”, which will be used to test whether our ini file is working correctly.

test=1

The format for an ini file is as follows: [Section] Key = Value. Once you’ve created your first setting, copy and paste this same code five more times, each with a different key linked to it. You can name these sections whatever you’d like, but if this is your first time using an ini file, it might be easier to use the same names.

Now that we have six different settings with six different values linked to them, select File -> Save (or hit ctrl + s) and name our file whatever you’d like. Once you’ve named it, go ahead and close notepad. You can also save your ini file anywhere you’d like, but for this example we’ll be saving it on the desktop.

Managing config file using configparser

Now that our file has been saved to our computer, let’s test it out by opening up a Command Prompt window and navigating to where we saved our .ini file. To do this, simply type “cd desktop” into your command prompt window and then press enter.

Now that we’ve navigated to our ini file using the cd command, let’s try and read it by typing “notepad filename”. Again, make sure you replace filename with the name of your .ini file. If all goes well, you should be able to read the settings linked to in our ini file.

If you’re having any problems reading your file using notepad, make sure that the file is saved as a .ini file rather than a .txt. If it still doesn’t work, try restarting your computer and trying again. If all else fails, you might need to download a different notepad application.
When you’re finished looking at your file, close notepad and go back to the command prompt window by typing “cd ..” and hitting enter. Now that we’ve navigated up one folder, we can remove our ini file by typing “del filename”. Replace filename with the name of your .ini file again.

When you’ve successfully removed your file, close the command prompt window and open up notepad once more. We now want to create a new ini file; this time we’re going to make one for each of our six settings linked to earlier. To do this, simply copy and paste each setting into a new notepad file. We also want to change the name of each section, so make sure you add a number at the beginning of each one.

  • test=1
  • settings_a=2
  • settings_b=3

Now that we have an ini file for each setting linked to in our original file, we can use the same command prompt window we used to delete our first file. Navigate to your ini files (whether it’s on the desktop or not) and type “notepad filename” again, but this time make sure you replace filename with the name of your .ini files.

How To Make ini File in Notepad

This should open up each file in its own notepad window. If you have trouble opening multiple files, make sure that you’re using a different notepad window for each one. Just like last time, the first thing we need to do is read our file by typing “notepad filename” and hitting enter.

Once you’ve opened up your ini file using the command prompt, copy and paste the same code we used last time into a single command window. You can do this by pressing ctrl + v to paste the code and then hitting enter twice to go onto the next line.

Now that we have one long string of code, let’s test our file by typing “start filename” and hitting enter. If you’ve successfully followed these steps, you should be able to launch either of the two notepad windows and see your settings linked to!

If this doesn’t work, make sure that you changed all of your sections to different numbers. If this still doesn’t work, try following these steps again but instead copy and pasting each line individually into the command prompt so that you have six different files.

If you’re looking for a way to automatically load your notepad window, follow these steps:

  • Make sure that you use ctrl + v rather than right click -> paste so that the line breaks are preserved.
  • This should open up your file using notepad. If you have any questions or issues, feel free to leave a comment!
  • If you’re looking for an easier way to create your ini files, check out this online notepad application I found. It’s pretty simple to use and it’s got lots of features if you want to keep track of your settings or add the same lines multiple times.

In conclusion, using notepad to read and write ini files can be a helpful way to manage your settings. Make sure that you follow the steps carefully and double check your code for mistakes. If you’re still having trouble, try looking for a different notepad application or leaving a comment below. Thanks for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *