Jump to content
Sign in to follow this  

create list of diretories loop from an ini file

Recommended Posts


Hi all,

want to ask if there is way to using "FOR ,NEXT" function or any other loop to read an ini file? my idea to read a certain segment of an ini file and go through the lines to create the directories , later if I add a new line in the ini and run the script (a compiled ) it will fetch the line and create the directory of that line.

thnx in advance


Share this post

Link to post
Share on other sites

more or less like this ,this read all lines in file ,I need to put a validation that reads a specific ini segment and fetch the lines from it.

thanx for the fast replay :blink:

Share this post

Link to post
Share on other sites


Global $Ini = @ScriptDir & "\Dir.ini"
Global $aIRS = IniReadSection($Ini, "DIRECTORY")

If Not @error Then
    For $i = 1 To $aIRS[0][0]
        If Not FileExists(@ScriptDir & "\" & $aIRS[$i][1]) Then DirCreate(@ScriptDir & "\" & $aIRS[$i][1])
I used in my Dir.ini


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.