[comp.sys.mac.programmer] Multifile Selection

fang@physics.phy.duke.edu (Fang Zhong) (11/03/90)

	I want to process multifiles from one folder in a program.  I don't
know how to do it in a real Macintosh way.  However, I could not make things
to work even in a simple way.  The following is my code.  I would appeciate
for any help to point out a correct way.

Fang

______________
	char **files;
	
	files = (char **)malloc(50 * sizeof(char *));
	for(i = 0; i < 50; i++) files[i] = (char *)malloc(64 * sizeof(char));

	types[0] = 'TEXT';
	
	i = 0;
	for( ; ; ) {
		SFGetFile(where, " ", nil, 1, &types, nil, &reply);
		if(!reply.good) break;
		files[i++] = reply.fName;
	}

	n = i;

	for(i = 0; i < n; i++) {
		subroutine(files[i]);
		......
	}
_____________

--
	Fang Zhong				1-919-684-8247
	Duke University Dept. of Physics	fang@phy.duke.edu
	Durham, N.C.      27706