Listing textual items from folder
#1

Hi.

I'd like to read and write all textual .ini files from folder using for loop but I don't know how.
Is there any way to parse those files like you parse IDs from folder. Thanks a lot.
Reply
#2

You can use a plugin to get a list of the files, then loop through them.

For example https://sampforum.blast.hk/showthread.php?tid=653119

There's an example in the thread to show how to loop through a directory.

Alternatively, if it's a thing you want to do only once, you can use a .bat file to generate a file list, open that file with the file functions and loop through that.

Although the first option should be more convenient.
Reply
#3

Quote:
Originally Posted by NaS
Посмотреть сообщение
You can use a plugin to get a list of the files, then loop through them.

For example https://sampforum.blast.hk/showthread.php?tid=653119

There's an example in the thread to show how to loop through a directory.

Alternatively, if it's a thing you want to do only once, you can use a .bat file to generate a file list, open that file with the file functions and loop through that.

Although the first option should be more convenient.
Thanks mate, i'll try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)