RE: Finding a file via php?

From: Date: Sat, 02 Sep 2000 07:31:52 +0000
Subject: RE: Finding a file via php?
Groups: php.windows 
Request: Send a blank email to php-windows+get-2384@lists.php.net to get a copy of this message
Hi Vince, Interesting problem below. The old DOS command "dir /s /d /b myprogram.ini" will give you the response that you want. if ( $filepath = exec("dir /s /d /b myprogram.ini") ) {} Unix probably has a shell command that you can use to do this. How about using php_ftp.dll to search through directories? (The above method is platform-specific, and it is better to find a cross-platform solution. If you do, offer it to this newsgroup as a class file...) Thanks. Re: -----Original Message----- From: Vince LaMonica [mailto:Vince.LaMonica@quest.com] Sent: Saturday, September 02, 2000 11:48 AM To: php-windoze Subject: 'find'ing a file via php? <snip> So I can do an if/then as far as looking for a directory that contains both myprogram.ini and myprogram.exe, but I haven't a clue as to how to locate this directory in the first place! Is there a way to use the window's 'find file' and/or the unix 'find' command to locate the directory that 'myprogram.exe' is located in? <snip>

« previous php.windows (#2384) next »