Exec("dir c:\somedir") or exec("cd somedir && dir")
i.e. $dirContent = <one of the above>; print($dirContent); -----Original Message----- From: Leif K-Brooks [mailto:eurleif@;buyer-brokerage.com] Sent: Monday, November 11, 2002 11:39 AM To: [EMAIL PROTECTED] Subject: [PHP] Exec()ing two strings, using same shell? Sorry if I'm using the wrong words - not sure of the exact terminology. Anyway, is there a way to exec() two statments in the same shell? Example: //On win32 test machine exec("cd somedir"); print `dir`; //Outputs directory listing for c:\, not c:\somedir //But is there a way to get the directory listing for somedir instead? // I know I could do `dir c:\someidr`, but I'm doing more complex stuff than this example. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php