Sign in to follow this  
Followers 0
Doxie

Search several ini files.

3 posts in this topic

Hi,

I am tired, hungry, irretated etc... :ph34r:

And i can´t get this to work :(

Problem:

I got ~160 ini files, with alot of data in them, now i wanna search them all for a specific data. That part is not hard, i figure out how to do that.

But...

Example:

1.ini

[blabla]

user=bob

serial=1010

2.ini

[blabla]

user=chris

serial=2020

3.ini

[blabla]

user=john

serial=3030

If i now make a "input" and type 2020, i want it to search all ini files until it find (uniq numbers) the correct serial. But how can i fetch the user of this specific ini file, were it finds the correct serial.

If its easier to know, the ini files are named as username, such as "chris.ini" etc..

ANY advice would be nice, this is driving me crazy

Thanks in advance


Were ever i lay my script is my home...

Share this post


Link to post
Share on other sites



Begin a loop of FileFindNextFile ( $search ) with $search = FileFindFirstFile ( "*.ini" ) , and in every file look the the ini value of Serial using Iniread and if it is the one ExitLoop and do what you want.

Too busy for making real code, sorry. Good luck.

Share this post


Link to post
Share on other sites

Begin a loop of FileFindNextFile ( $search ) with $search = FileFindFirstFile ( "*.ini" ) , and in every file look the the ini value of Serial using Iniread and if it is the one ExitLoop and do what you want.

Too busy for making real code, sorry. Good luck.

That's a good clue now just look at the findnext emaple in the help

I find I have to copy and paste it still to use it

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0