samedi 1 août 2015

If a specifc folder exists then delete all the contents, else stop the script

I need a script to find if a folder "c:\backup" really exists, delete all the folders contents BUT not delete the "backup" folder itself.

Need to be some "IF" function for security reasons to don´t get the risk for the script don´t find the folder (for any reason) and then start to delete all other folders in the system. So if the script don´t find the folder, the script has to abort the action.

Thank you!

Aucun commentaire:

Enregistrer un commentaire