Xref: utzoo comp.os.msdos.programmer:2032 comp.windows.ms.programmer:173 alt.msdos.programmer:2219 Path: utzoo!utgpu!cs.utexas.edu!yale!cmcl2!polyof!karl From: karl@polyof.poly.edu (Karl H. Muhlbach, Staff) Newsgroups: comp.os.msdos.programmer,comp.windows.ms.programmer,alt.msdos.programmer Subject: DOS dir command - How does it work? Message-ID: <1990Nov19.212134.6012@polyof.poly.edu> Date: 19 Nov 90 21:21:34 GMT Organization: Polytechnic University Lines: 36 Dear Fellow Netters: I am writing a little utility but I need to get some insight on something. I was wondering how DOS accomplishes the dir command. Is it done via the DOS system calls or is it bios related? The reason I ask is that part of my utility is to read a diskette and reference every file on the diskette to see its file attributes (ie. size, date, permissions, etc.). Unlike DOS I need to traverse the tree structure to recursively reference every file. DOS will only indicate that a particular file is a subdirectory and not change dir to reference the files in it. I was considering using the ftw (file tree walk) system call but was concerned about the max. open file limitation of 20. Could anyone shed some light on this for me. This aspect and its speed performance are the only things holding back the efficient completion of the utility. I have it working with referencing the disk using the ftw call but there must be a more efficient and quicker method. I would greatly appreciate any help that might be sent my way. Please EMail me any responses so that I may have a quicker turn around time on an answer since I do not get much time to read news. Also, if your response is to RTFM then fine, point me in the direction of a decent book on DOS internals and I will RTFM! The books I have seen do not go into stuff like this. Thanks to all in advance! Karl M. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Karl H. Muhlbach Email: karl@polyof.poly.edu Voice: (516) 794-0142 FAX: (516) 794-0142