Re: [PHP] simple command help

2008-03-01 Thread Shelley
Daniel Brown wrote: On Fri, Feb 29, 2008 at 5:22 AM, Shelley <[EMAIL PROTECTED]> wrote: Hi all, 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 a "command" in PHP to do this. You'd have to write a script t

Re: [PHP] simple command help

2008-02-29 Thread Daniel Brown
On Fri, Feb 29, 2008 at 5:22 AM, Shelley <[EMAIL PROTECTED]> wrote: > Hi all, > > 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 a "command" in PHP to do this. You'd have to write a script to handle that processing.

Re: [PHP] simple command help

2008-02-29 Thread Richard Heyes
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 els

[PHP] simple command help

2008-02-29 Thread Shelley
Hi all, What's the command to use if I want to remove all the directories and files except 'a.gz' under a directory? Thanks in advance. Regards, Shelley -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php