AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get Filelist of a directory (https://forums.alliedmods.net/showthread.php?t=17131)

TFTomSun 08-26-2005 09:24

get Filelist of a directory
 
hi...

how can i get a filelist /read the filenames of a directory


thank you, TFTS

Xanimos 08-26-2005 11:40

Code:
#define MAX_FILES 100 new szDir = "directory/path/"; //... new szFiles[MAX_FILES][75], FileCount = 0; new DirH = open_dir(szDir,szFiles[FileCount],74); while(next_file(DirH,szFiles[++FileCount],74) ) {   if(FileCount == MAX_FILES) break;  } //All the files will be stored into szFiles as a two-dimensional array.

TFTomSun 08-26-2005 13:45

thank you


All times are GMT -4. The time now is 14:33.

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