Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,161 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Find all Mdls Files in a Folder #441067
05/11/14 10:40
05/11/14 10:40
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Hi!

I need a list of all mdl files in a folder.
There was once a snippet around that could do just that but I wasn't able to find it.

Thank you
Puppeteer


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: Find all Mdls Files in a Folder [Re: Puppeteer] #441068
05/11/14 10:55
05/11/14 10:55
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Code:
//scan for mdl files
WIN32_FIND_DATA FindFileData;HANDLE hFind;STRING* tmp_str="";
str_cpy(tmp_str,STR_DIR);  //-> set directory (STR_DIR)
str_cat(tmp_str,"\\*.mdl");//Models
hFind=FindFirstFile(_chr(tmp_str),&FindFileData);
if(hFind!=INVALID_HANDLE_VALUE)
{
	int c=0; while(1) 
	{ 
		str_cpy((TEXT_file_list.pstring)[c],_str(FindFileData.cFileName));
		c++;

		if(!FindNextFile(hFind,&FindFileData)){break;}
	} 
}
FindClose(hFind);


Re: Find all Mdls Files in a Folder [Re: oliver2s] #441070
05/11/14 11:46
05/11/14 11:46
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
There is a lite-C function for that, sadly not with the best name and thus hard(er) to find:

http://www.conitec.net/beta/txt_for_dir.htm


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1