Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Secure File Removal Using the ERASE Command, Examples?


Please use Eraser to delete sensitive data. It can also clean digital SD memory cards of all recoverable data!



As with Linux, Appel's Mac OS and other systems like Android, Microsoft Windows 11, 10, ... and MS Server OS has programs to safely delete data. There are handy programs, such as free Windows Safe Delete tool.

But if you want to do this important task with cmd.exe, you will find helpful tips and examples here. PS: The command program ERASE is often used by administrators on Windows Server systems, but you can also test it for yourself.

 
Content:

1.) ... The deletion under Windows with the command ERASE examples! 
2.) ... Where is the advantage when deleting about Windows command ERASE? 
3.) ... What should I pay attention to when using the ERASE command?




1.) The deletion under Windows with the command ERASE examples! 


Example 1:

At the command prompt, type the following command, press Enter!


ERASE / F / S / Q / A "C:\Windows\System32\calc.exe"
C:\Windows\System32\calc.exe
Access denied
 


Tip: You can use X any full path to the quoted extension file, even if there are spaces!
 
Example 2:

To delete all files in a folder without confirmation in the command prompt 


ERASE C:\Windows\System32>ERASE /F /S /Q /A "C:\delete\*"
File was deleted  - C:\delete\test.zip
File was deleted  - C:\delete\test.xls
File was deleted  - C:\delete\test.doc
 
C:\Windows\System32>

 

Example 3:

To delete all files with a given file extension in a folder with confirmation in prompt, for example, delete all Microsoft Excel files in a folder.  


C:\Windows\System32>ERASE /P /F /S /A "C:\Importantfolder\*.xls"
Do you want to delete "C: \ Importantfolder \ Private.xls" (Y / N)? y
File deleted - C:\Importantfolder\Private.xls
Do you want to delete "C:\Importantfolder\Security.xls" (Y / N)? y
File was deleted - C:\Importantfolder\Security.xls
Do you want to delete "C:\Importantfolder\Important.xls" (Y / N)? y
File deleted - C:\Importantfolder\Important.xls
 
C:\Windows\System32>

Tip:
Wildcards can be used to delete multiple files. If a directory is specified, all files in this directory will be deleted! 
 
Parameter von ERASE man kann mit einem Test-Ordner ein wenig experimentieren!

/P Prompts you for confirmation before deleting each file.
/F Forces deletion of read-only files.
/S Deletes all files in all subdirectories.
/Q No query when using global placeholders.
/A  Selects the files to be deleted by the attribute.

Attributes: 
R  Read-only files 
S  System files
H  Hidden files 
A  Files to archive
I   Unindexed files 
L  Analysis points
 
         

2.) Where is the advantage when deleting about Windows command ERASE? 

Especially with external drives, you can specifically delete certain file extensions. And the deletion confirmation is also handy, not accidentally delete important files.

If you remove a document or an app on your Windows PC, you will find that it has been moved directly to the Recycle Bin, and / or not deleted, especially if you do not see a deletion confirmation dialog before, the deletion is not a real delete action.

If you want to prevent others to restoring important secure data from the Recycle Bin , it's a good idea.

3.) What should I pay attention to when using the ERASE command?

But beware!
Wildly deleting files or folders is not recommended, especially without the necessary knowledge.

See also:
►►  ... unlock (protected) files or delete them! 
►►  ... Secure deletion of files for more protection! 

 


FAQ 40: Updated on: 11 July 2022 03:47 Windows
Windows-Console

Using SCHTASK for Programs Autostart in all Windows OS, how to?


Time controlled Autostart of Windows 11, 10, etc. programs In new Windows OS you can use SCHTASK to start programs at a certain time Start the cmd.exe
Windows-Console

Redirect CMD command output to a file, with an example?


Use redirection operators to redirect or save the results of a command prompt in a file on MS Server OS or Windows 11, 10, As with MAC OS and Linux,
Windows-Console

Create multiple guest accounts on Windows 11, 10, 8.1, MS Server with commands?


It is very easy to create multiple guest accounts for guest users under Windows 11 / 10 / 8.1 / 7, or Windows Server by using command lines It is not only
Windows-Console

Check if there is a file path via PowerShell?


The solution is very simple to use a command in PowerShell to check whether a file path or folder path is available The solution is very simple with the test-path command,
Windows-Console

Use batch file to start multiple programs on Windows 11, 10...!


Start several programs at the same time via a batch file in order to save several clicks, is very popular on MS Windows 11, 10, desktop and server operating
Windows-Console

How do I force a logoff via command line, Windows 11, 10, 8.1, .. and MS Server?


The solution is very simple, to force that the logoff is carried out via the command line under Microsoft Windows 11 / 10 / 8.1 / 7 If some programs have
Windows-Console

Create bootable USB stick with Windows, but how?


Creating a bootable USB stick as an installation medium for Windows is no magic Everyone comes to this point and wants a solution that is very simple to

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, 11, 10, server, eleven, console, secure, file, removal, using, erase, command, examples, delete, sensitive, data, clean, digital, memory, cards, recoverable, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + ShortDoorNote
  + AutoHideDesktopIcons
  + BlankAndSecure
  + AlwaysMouseWheel
  + NewFileTime
  + DesktopClock3D
  + PointerStick
  + DesktopImages3D
  + WinPing
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.078


► What are EPUB files? ◄

► How to open in Windows 8.1/10 the program path through the task manager? ◄

► Create hard links and soft links under Windows via command prompt! ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....