Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Reading and writing INI files (BATCH)
Name: willz Date: May 5, 2009 at 18:20:16 Pacific OS: Windows Vista Subcategory: Batch
Comment:
ok let's say I have an INI file and this is the contents
[you] name=george
now... how ddo I create a batch to read this in and put
Name: ghostdog Date: May 5, 2009 at 19:34:14 Pacific
Reply:
if you foresee that you are going to do such things often in future, you can use a programming language that provides modules to parse ini files easily. eg here's a Python script
import ConfigParser
config = ConfigParser.ConfigParser()
config.read("file")
for section in config.sections():
if section == "you":
for option in config.options(section):
print "hello " ,config.get(section, option).split("=")[-1]
Summary: Hello all I've been googling for almost 3 hours for a code to read and write .ini files with VC++ 2003...but all of them produce some annoying errors. Sorry I'm new to VC++ so I get a little frustrate...
Summary: Hi there I need to know how to read and write the disk sectors for a disk in win32 with c/c++. What is the API function and how to use it ? if you have an example,please provide me. Thanks very much, ...