[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Command to Delete All Files Permanently with No Prompt

Posted on 2014-01-08
3
Medium Priority
?
6,741 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 13

Accepted Solution

by:
ktaczala earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

829 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