From: jhudd AT tongue1 DOT itc DOT nrcs DOT usda DOT gov (John Huddleston) Subject: directory listings (fwd) 17 Mar 1998 02:15:50 -0800 Message-ID: <9803152112.AA08028.cygnus.gnu-win32@tongue1.itc.nrcs.usda.gov> Content-Type: text To: gnu-win32 AT cygnus DOT com (GNU 32) Scott Mueller wrote; > > I can't believe how incredibly frustrating it has been to simply display > a list of files in the current directory with a c program. I wrote code > using opendir and readdir in dirent.h that works perfect. However, I > can't have that extra .dll file. So, before I knew about mingw32, I > downloaded djgpp and lcc. djgpp worked, but would only list files as > 8.3 format. Then, lcc didn't have dirent.h. It had io.h, which > contained findfirst and findnext. That seems to work except it keeps > crashing after running?! So, now I try mingw32 and compile, but get > errors of > unresolved references resembling those in part 2.7 of the readme. I > can't fix that. > > ... > > Can anyone help me? I just want to run a c program that displays > filenames in the current directory at the dos prompt. SO MUCH > appreciation will be given! Here's two for the cost of one (email that is!). First is source code in a file tree.c that will list files in a current directory. Second is source for a 'type' command to find an executable in your path. Two ways to find files. John Huddleston jhudd AT itc DOT nrcs DOT usda DOT gov begin 664 src.tar.gz M'XL("#M###4``W-R8RYT87(`[1EK<]-(DJ^FBO\P9"&Q'3NV\H284!>(=S=5 M(:%LA[LMH%**-(IU:TLJC>209?/?K[OGH9'M!)8ZV+HZ=4$LC?HU/=T]/3W9 M-.D\^,[`MKM[>SOL`6/;NSOTZVQM[N*OABYCNSO=K>ZVL[V[">^`OOV`[7QO MQ1!RD;DI8P_^/Z: M]=_:V8//CK.[]X!UOY]*!?R?KW^GN008.XJ]?,JCS,W".&)#,%'&V#+4YJ.' ML(2GAV_Z]`"`WE3S0Y%,W!O!@G#"!7,CG_EARKTL3D,N-*H-[7:;AH_ZP]># MX[>CX[/31P]KHW$H6)+&5ZD[9=?A9((O?NYQYAJ&-X"GY#$_OHZNW=07&\B, M&)X/#W\!Y6JH%VO/%B4?'+QD,YX*F*E!&_-)EKG-]0VT'"^T;FY(9E,?/B'/",&T@*%L0I&QV^TL;N_^OPS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&4)HBP$'?[/]Y!KZ"""BJHH((**JB@@@HJJ*"""BJHH((**JB@ >@@HJJ*"""BJHH((**JB@@@HJ^'O@/W@=M.P`4``` ` end - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".