Open all the files in a dir?
#4

you could create one extra file: "PlayerList.ini".
In this file, every line holds the name of the datafile (account-file) for every player:
Код:
PowerPC603.ini
CrazyGuy.ini
Spongebob.ini
Read this PlayerList file line by line and open/read/close the file that was listed on that line.
Then, when you reach the end of the file, you've processed all player's datafiles.

When a new player registers himself to your server, add the filename of his account to this PlayerList.ini file.

You can use the command "dir" (in the windows command prompt) to build this file:
Select "Execute..." from your start menu and enter "cmd".
This opens the command prompt.
Changedir to your server's directory.
Then type:
dir /B >> PlayerList.ini

This lists all files without size-info (only the filenames) and adds them all to the PlayerList.ini file.
Reply


Messages In This Thread
Open all the files in a dir? - by SimonItaly - 20.12.2010, 14:23
Re: Open all the files in a dir? - by SimonItaly - 22.12.2010, 21:11
Re: Open all the files in a dir? - by Nero_3D - 22.12.2010, 21:30
Re: Open all the files in a dir? - by PowerPC603 - 22.12.2010, 22:30

Forum Jump:


Users browsing this thread: 6 Guest(s)