PC Review


Reply
Thread Tools Rate Thread

Adding to search path

 
 
Ken
Guest
Posts: n/a
 
      9th Jul 2003
I know to permanently change the search path in DOS use

path=%path%;c:\someprogram\

but how do you do a non-permanent search? Can I use the
APPEND command. What I want to do is search the regular
PATH and additional paths without altering the original
PATH.

Thank you in advance.
 
Reply With Quote
 
 
 
 
Marty List
Guest
Posts: n/a
 
      9th Jul 2003

Define what you mean by"search". Are you trying to launch a program, and
let the OS search for it in the path, or are you really searching the path
yourself?

The simplest option may be:

SetLocal
Set OLDPATH=%PATH%
Set PATH=%PATH%;C:\SomeProgram\
:: Do you stuff here
Set PATH=%OLDPATH%



 
Reply With Quote
 
Tim Hill
Guest
Posts: n/a
 
      22nd Jul 2003
Any change made is local to the current shell session. So you can either use
setlocal/endlocal to bracket the changes, or invoke a different CMD.EXE
instance to do the work.

Example:

setlocal
set PATH=c:\foo;%PATH%
(do some stuff)
endlocal

-Tim

"Ken" <(E-Mail Removed)> wrote in message
news:9a9e01c34638$16f231f0$(E-Mail Removed)...
> I know to permanently change the search path in DOS use
>
> path=%path%;c:\someprogram\
>
> but how do you do a non-permanent search? Can I use the
> APPEND command. What I want to do is search the regular
> PATH and additional paths without altering the original
> PATH.
>
> Thank you in advance.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Search Path Mr. Z Microsoft Windows 2000 Setup 1 24th Aug 2004 07:05 PM
Adding an assembly search path to the IDE Bob Microsoft VB .NET 2 26th Jul 2004 07:19 PM
adding patch to windows search path ? * ProteanThread * Windows XP General 3 24th Apr 2004 04:35 PM
adding path to windows search path * ProteanThread * Windows XP Basics 2 23rd Apr 2004 08:04 PM
Adding networked drive to path causes path to fail Sean Bamforth Microsoft Windows 2000 Networking 0 16th Jul 2003 11:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.