AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] Look trough folder in configs (https://forums.alliedmods.net/showthread.php?t=118179)

grimvh2 02-08-2010 12:29

[Solved] Look trough folder in configs
 
Hello everyone,

How can you get the names of each folder located in for example :
cstrike/addons/amxmodx/configs/myfolder/

Thanks in advance,
Greetings Grim.

Exolent[jNr] 02-08-2010 12:45

Re: Look trough folder in configs
 
Code:
new szDir[ 64 ] = "cstrike/addons/amxmodx/configs/myfolder"; new szFileName[ 128 ]; new hDir = open_dir( szDir, szFileName, 127 ); if( !hDir ) {     return; } new szPath[ 192 ]; do {     formatex( szPath, 191, "%s/%s", szDir, szFileName );     if( dir_exists( szPath ) )     {         // szPath is a folder     }     else if( file_exists( szPath ) )     {         // szPath is a file     } } while( next_file( hDir, szFileName, 127 ) ); close_dir( hDir );

grimvh2 02-08-2010 13:00

Re: Look trough folder in configs
 
Thanks Exo (:


All times are GMT -4. The time now is 07:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.