Re: simple command help
| From: | Richard Heyes | Date: | Fri, 29 Feb 2008 11:15:09 +0000 |
| Subject: | Re: simple command help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270725@lists.php.net to get a copy of this message | ||
What's the command to use if I want to remove all the directories and files except 'a.gz' under a directory?There isn't one. If you're using *nix, you could try this: exec('find ! -name a.gz -maxdepth 1 -exec rm -rf {} \;'); Or something like that. If you're on Windows you'll need someone else... :-) -- Richard Heyes Employ me: http://www.phpguru.org/cv