Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!uupsi!fozzie!stanley From: stanley@phoenix.com (John Stanley) Newsgroups: comp.os.msdos.programmer Subject: Subst dereferencing Message-ID: Date: 5 Jan 91 05:01:04 GMT Organization: Not BIFF At All (NBAA) Lines: 23 I have a nice, cute little C program that duplicates the 'which' command from UNIX. Basically, it searches the path for what will be executed for any given command (i.e. 'which format' tells me 'C:\DOS\FORMAT.COM'). I have also packed a lot of stuff into my path by using SUBST to create new drives. E.g., Q: points to D:\WP50. (All 26 drive letters are used, except G:, which is reserved for a ram disk when I need it.) Now the problem. I still think in terms of D:\WP50, since that is more reasonable than Q:. I really want this 'which' to show both the SUBST drive and the real path. E.g. "Q:\WP.EXE -=> D:\WP50\WP.EXE" Is there a system call that will expand a SUBST drive name into the real path? I see none in any of the docs I have. Right now, the only way I can think of is to do a system() call, dumping the output of a SUBST command to a file, and reading that back in. Ick! I do it, and it works, but, oooohhhh. ><><><><><><><><----- stanley@PhoEnix.com Tara: "They are carpenters and gardeners, and not tomato men."