Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!richardh From: richardh@killer.UUCP (Richard Hargrove) Newsgroups: comp.sys.ibm.pc Subject: Re: How to add to PATH on the fly? Summary: extend and restore PATH var Message-ID: <4591@killer.UUCP> Date: 25 Jun 88 12:56:39 GMT References: <688@crcmar.crc.uucp> Organization: The Unix(R) Connection, Dallas, Texas Lines: 33 In article <688@crcmar.crc.uucp>, patrick@crcmar.crc.uucp (Andrew Patrick) writes: > How can I add directories to my PATH specification on the fly? > > I want to leave the path as it is and simply add directories on the > end. I don't want to edit AUTOEXEC.BAT and reboot, and I don't want > the changes to be permanent. The simplest way to do this is to create two .BAT files named, say, PA.BAT and ADDPA.bat. Their contents: ADDPA.BAT: PATH %PATH%;%1 PA.BAT: PATH {the same path definition you have in command.com} To add a PATH node, you enter ADDPA {pathnode} To restore the original PATH, you enter PA OF course, if you use some sort of shell or interface enhancement utility like [P]CED, there may be other ways to accomplish the same thing without eating up disk space. richard hargrove ...!{ihnp4 | codas | cbosgd}!killer!richardh --------------------------------------------