Note rm -f './*' is not necessary as rm -f '*' will work just fine (the ''s inhibit expansion of the *). And yes it is dangerous. Using unlink ("-fr *"); in a C program is going to try to unlink a file named -fr * to unlink a file named * in a C program use unlink ("*"); John 'picky picky picky' Stafford