Solved

Command to Delete All Files Permanently with No Prompt

Posted on 2014-01-08
3
4,679 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

OfficeMate Freezes on login or does not load after login credentials are input.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

786 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