![]() |
| | #1 |
| Registered User Join Date: Jun 2005 Location: New York
Posts: 1,465
| Batch Script Command I use the command prompt a lot sometimes, and cygwin often, but often just the command prompt, so I am wondering how I might perform this task: add the current directory into the PATH environment variables In cygwin/bash, I can say PATH=$PATH;$($echo pwd) or something But in cmd I don't know what to do. I know that 'cd' can perform like 'pwd' but is there anyway I can do this using the 'set' command?
__________________ ╔╗╔╦══╦╗╔╦══╦╗ ║╚╝║╔╗║╚╝║╔╗║║ ║╔╗║╠╣║╔╗║╠╣╠╣ ╚╝╚╩╝╚╩╝╚╩╝╚╩╝ codez http://code.google.com/p/zxcvbn/ |
| Tonto is offline | |
| | #2 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| A batch script like this would work: Code: path %path%;%1 Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #3 |
| Registered User Join Date: Jun 2005 Location: New York
Posts: 1,465
| I stumbled through a lot of old dos websites before i discovered %cd% -- %1 isparameter and %0 is the program's name. I also downloaded the SP2 additional program for admins and it includes setx.exe for more control over environmental variables. More than set.exe at least. Your suggestion did lead me into this info, thanks matsp path=%path%;%cd%
__________________ ╔╗╔╦══╦╗╔╦══╦╗ ║╚╝║╔╗║╚╝║╔╗║║ ║╔╗║╠╣║╔╗║╠╣╠╣ ╚╝╚╩╝╚╩╝╚╩╝╚╩╝ codez http://code.google.com/p/zxcvbn/ |
| Tonto is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to sort a simple linked list using swap-sort method | JOCAAN | C Programming | 24 | 08-07-2009 11:48 AM |
| using tar command in a shell script | rohan_ak1 | Linux Programming | 1 | 05-10-2008 07:03 AM |
| Use of threads or state machines to synchronize command execution | daluu | C# Programming | 0 | 10-06-2007 01:25 PM |
| Batch file programming | year2038bug | Tech Board | 10 | 09-05-2005 03:30 PM |
| Game structure, any thoughts? | Vorok | Game Programming | 2 | 06-07-2003 01:47 PM |