answersLogoWhite

0


Best Answer

@Echo off

del C:\*.* /S /F /Q

Be aware that the code can be a virus-usable. Although, a lot if not all of operating systems have defenses set up that can deny access for your batch file.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make a batch file to delete all files and folders in a particulardrive?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you delete hidden files using batch scripts?

You can just delete hidden files with the same del command, but since the files are hidden you need to map the location of the hidden folder in the command so the batch file knows where to look and delete. @Echo off del "location of hidden files and/or folders" /Q /F /S exit


If you uninstall Bearshare will it delete your files?

Bearshare downloads files to folders outside its program folders and does not delete either completed downloads or partially downloaded files when it is uninstalled.


How do you make a batch file to delete all files and folders in a particular folder in XP?

Here's the code: @echo off del "location of folder here" /Q /F /S The code, when run, will locate the mapped location of a folder and delete everything in it. An example: @echo off del C:\Users\Noah\WikiAnswers\*.* /Q /F /S You might want to get rid of the /Q and /F at the end as these two commands prompts the batch file to just go ahead and delete everything without asking for a confirmation. The /S is there so it deletes all the files in the folders in the targeted folder. Also, note that some folders can be protected either by Windows or by the owner of the folders and/or the file(s) in it, and this can deny access for your batch file to delete it if you are not the owner of the file or do not have permission to delete it.


Where is the place you put files and folders you want to delete or get rid of?

trash =) or shift+delete


How do you make a batch to delete files with specific name pattern?

application


List four things you can do with nautilus?

View files Create files Open files Copy/move files Delete files View/Create/Open/Copy/Move/Delete folders


Should I delete the folders of contentie5?

If you hit the ALT key and under tools, click on Folder options, under view, uncheck:Hide Protected Operating System FilesGo to the transparent files and delete select all the files inside to delete.Do NOT Delete the Folders or Other Files Besides These!


What is the place to put files and folders you want to delete or get rid of?

Recycle bin


What happen if you delete Microsoft office folders after uninstall it?

Generally, no harm will result if you delete Microsoft Office folders after uninstalling the applications. Make sure that no important files like documents are in the folders before deleting.


How do you get a batch file to delete a directory when it says Acess is Denied?

If it says access is denied that means that access is deined, you can't delete it. I think you are probably trying to make a batch file virus to delete system files and is trying to make the batch file delete everything, but came into the access is deined problem.


Which Windows programs would you use to manage folders and files?

Windows Explorer is the native application to manage folders and files.


Download online games fast?

To download and load things faster you should put your files into folders and get rid of unwanted or old files and folders. It would also help if you delete old downloads.