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 );
__________________