If you have a hard disk you need to scrap or sell and you want to remove your data from it, this is the place for you. In our case, we had 700 3TB disks that need to be wiped and resold so we wanted to make sure it would be very difficult for even professionals to get the data off of them.
If you know what you are doing but just need the script click HERE to download it or skip down to QUICK SCRIPT TO WIPE HARD DRIVE, below.
The script below is self explanatory for anyone familiar with DISKPART but if you are not, you need to figure our which DISK and which VOLUME you want to kill. To do that we simply run through the script manually once and then all of the others will be the same:
Once you know the DISK # and the VOLUME # you can download THIS SCRIPT and unzip and run it. In fact there are two scripts included:
Download the disk wiping script HERE or build one yourself using the code below.
You can run first script by bringing up a CMD prompt as an administrator, change the directory you unzipped the files into (I used C:\TEMP) and then type:
DISKPART /S WIPE.CMD
Where WIPE.CMD is the following:
select disk 1
clean
convert gpt
create partition primary
select volume 3
format quick FS=NTFS label=New2U
assign letter="U"
Simply removing partitions and volumes does not make it impossible to recover the data. To do that you have to overwrite parts of the disk. To meet various government and industry standards, various “destructive wipe” tools will copy zeros to every sector on a disk, perhaps more than once. For most people that is overkill, so we devised a faster, simpler solution:
This is definitely NOT as secure as certified solutions that write over the whole disk, but it is a whole last faster and very effective.
In our case the disks had data striped across many disks which means to get a single file back, you would need to have more than one disk and rebuild the RAID array before you could even attempt a recovery. Good luck with that. The CIA with an unlimited budget and manpower can do this but no-one else is.
To make this more flexible our script calls to copy anything named TEMP in the same folder as the script, to the doomed drive. The idea being you can easily copy more or less as you see fit. If you are more worried about protecting the data on your former disk, copy more stuff or larger stuff.
In our case I simply took a 10MB EXE file, renamed it TEMP.EXE and then made 20 copies of it. That means our script would copy 200MB of garbage to the drive. If you had more time, you could find a larger file, rename it temp.anything and then make 100 copies of it. The script would then copy those files larger file to the doomed drive making it even more unlikely recoverable.
The WIPE-COPY-WIPE.bat file HERE does just that. This is not acceptable for government data but just fine for almost everyone else.
If you want more information on how to overwrite a drive, you will like THIS article.
This website uses cookies.
View Comments
Did you know that when you “delete” files from your computer, they can still remain on your hard disk?
In many cases, deleted files can be recovered with little effort
because most computer operating systems will only delete links to the data so they no longer appear to you, but the actual data remains on the
disk. Getting access to the deleted data is as simple as restoring the links.
This method of deletion is fine for most circumstances–where security is not an issue–but you
wouldn’t want some people to recover your financial statements or
medical records. For sensitive data, you need to make sure that your computer
overwrites both the links to the information and the information itself.