Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!snorkelwacker.mit.edu!ai-lab!mbeck@ai.mit.edu From: mbeck@ai.mit.edu (Mark Becker) Newsgroups: comp.os.msdos.programmer Subject: How to determine if a file is in a root directory? Message-ID: <12201@life.ai.mit.edu> Date: 4 Dec 90 21:34:54 GMT Sender: news@ai.mit.edu Followup-To: comp.os.msdos.programmer Lines: 30 Hello * Consider the following situation: I have a piece of software that, as part of it's normal function, takes a directory reference from a configuration file and uses that reference as the top of a directory tree used to contain a bunch of data files. This directory is created during execution and wiped out afterwards. In order to prevent possible configuration errors and major grief, I want do a little sanity checking on the reference that the installer sets up. Turning this thing loose on someone's root directory could lead to a disaster. SUBST is one source of major pain. Novell netware is another, given that it can 'map' drive designators to all kinds of strange places over a network. Is it possible to determine if a given file or directory is in the root directory of a disk drive even though it may be SUBST'ed or Novelled? Suggestions and/or pointers to relevent information would be appreciated. Regards, Mark mbeck@ai.mit.edu -or- mbmm!mbeck@talcott.harvard.edu