How to destroy all the files in a directory

This topic is just for fun. I don’t know if there is any real implementation of this script or not. Suppose, we have lots of files and folders in a directory and we want to delete all the files and folders at a time. In such cases the following script will take the key role.

Step 1:  Create PHP file, say remove.php .

Step 2: Put the following PHP codes inside remove.php file.

Step 3: Place this remove.php file inside the directory for which you want to delete the files and folders.

Step 4: Now open the file in your browser as : http://www.yourdomain.com/remove.php

You will get a message ‘All files have been removed’.

It will delete all the files and folders of your directory and the main notice is, the file remove.php will also be deleted.

Warning : Please do not use this script for any harmful or destructive cause.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *