Solved

Command to Delete All Files Permanently with No Prompt

Posted on 2014-01-08
3
4,174 Views
Last Modified: 2014-01-08
What parameters with the del command can I use to delete a folder, all of it's contents, for all file types (read-only, those with missing permissions, etc), permanently, and without a prompt to select yes or no.

Is this sufficient?

Del "Z:\FolderName" /f
0
Comment
Question by:fireguy1125
3 Comments
 
LVL 12

Accepted Solution

by:
ktaczala earned 500 total points
ID: 39766983
Use:

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if ok to remove a directory tree with /S
0
 
LVL 24

Expert Comment

by:aadih
ID: 39766990
/f is for force deleting of read-only files.

/q is for quiet mode, i.e., do not ask if ok to delete on global wildcard.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39767253
if you dont have permissions to files it wont work still of course, will need to push permissions down and/or take ownership as usual.

steve
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now