Get file list in a directory - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get file list in a directory (
/showthread.php?tid=429022)
Get file list in a directory -
trollkemada - 07.04.2013
So I have an account system file-based, and sometimes i'd like to do something to all users. Is there anyway I can get the list of file names in my directory?
Re: Get file list in a directory -
Riddick94 - 07.04.2013
Of course you can.. only if you saved them somewhere. For example, if player register on your server then you gonna save his nickname to seperate file and do the same thing with other player and do it over and over. But you can't just get a file name, you have to type a file name.
Re: Get file list in a directory -
FUNExtreme - 07.04.2013
You can do this with a plugin, let me find it
EDIT:
https://sampforum.blast.hk/showthread.php?tid=411268
Respuesta: Re: Get file list in a directory -
trollkemada - 07.04.2013
Quote:
Originally Posted by Riddick94
Of course you can.. only if you saved them somewhere. For example, if player register on your server then you gonna save his nickname to seperate file and do the same thing with other player and do it over and over. But you can't just get a file name, you have to type a file name.
|
Actually Im doing that right now. But it's hard to maintain when deleting users, or things like that. I just was looking for a simplier way.
Re: Get file list in a directory -
Riddick94 - 07.04.2013
You can't check file name (99,9% sure). I've never heard about function to check file name. Even in y_ini. So, I think, that's the only one way to check it, just save it to seperate text file and read it when you need, probably the best way. If you gonna delete user you can remove entry with y_ini (best way of file handling).
Re: Get file list in a directory -
Pottus - 07.04.2013
I don't know whats wrong with Riddick but he seems pretty out to lunch.
Respuesta: Get file list in a directory -
trollkemada - 07.04.2013
I've found this:
https://sampforum.blast.hk/showthread.php?tid=113485
Thank you all anyway.
Re: Get file list in a directory -
Babul - 07.04.2013
FileManager and
Directory2 are also quite useful plugins