Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi read from inifile (https://www.delphipraxis.net/150680-read-inifile.html)

sdean 23. Apr 2010 14:31


read from inifile
 
Hi , i've this inifile structure :

[Files]
FilesCount=3
[1]
name=m.txt
[2]
name=ms.txt
[3]
name=md.txt

please how could i read the files name based on FilesCount like this :

m.txt
ms.txt
md.txt


thank you in advance

Teekeks 23. Apr 2010 14:41

Re: read from inifile
 
visit the unit inifiles.
There is a class TInifile.

hitzi 23. Apr 2010 14:41

Re: read from inifile
 
-> http://docs.embarcadero.com/products...eadString.html

sdean 23. Apr 2010 14:46

Re: read from inifile
 
thank you all , i know how to use inifiles , but please how could i read thes values under :
[1]..[3]

the result will be :

m.txt
ms.txt
md.txt

hitzi 23. Apr 2010 14:49

Re: read from inifile
 
Read the FilesCount value and make a "for" loop which goes thru all numbers between 1 and FilesCount value and use readstring(inttostr(number), ....) to get the path.

sdean 23. Apr 2010 14:53

Re: read from inifile
 
Thank you hitzi , could you please give me a little example for that ....

sdean 23. Apr 2010 15:00

Re: read from inifile
 
Thank you hitzi i did it .

many thanks for you all .


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:55 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz