Create/edit an .ini File

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
D007Nomad
Posts: 3
Joined: 27 Jan 2016 23:11

Create/edit an .ini File

#1 Post by D007Nomad » 01 Feb 2016 01:02

Hello all.

I Hope you can help,

I am trying to use a batch file to edit an .ini file, and then save it.

Basically, it needs to be able to navigate to :

C:\Users\jason\AppData\Roaming\PAS\Common

Open the file PAS.ini within that folder, delete all of its contents and replace it with new text, then save.

Alternatively - if its easier, I can just create a new ini. file and replace the old one with the new one.



Thank you all in advance.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Create/edit an .ini File

#2 Post by Squashman » 01 Feb 2016 07:45

You would not just open it and delete the contents. You would either just use the delete command to delete the file or overwrite the file with the new contents. But you will need to do a much better job of explaining what you are trying to do. You have not provided enough detailed information for anyone to provide you an answer that may solve your problem.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Create/edit an .ini File

#3 Post by foxidrive » 02 Feb 2016 01:11

I'll give the guy a hand, Squashman.

This overwrites everything inside and puts the word five inside the ini file.

Code: Select all

>"C:\Users\jason\AppData\Roaming\PAS\Common\PAS.ini" echo(five

Post Reply