Write zeros to a hard drive – Wipe/Erase unused or free space

Windows: Format and write zeros to every sector of the drive.
format <Driveletter> /fs:NTFS /p:0

Windows: Format and write zeros to every sector of the drive. After the first pass write random numbers.
format <Driveletter> /fs:NTFS /p:2

Windows: Fill free space.
cipher /w:<Driveletter>[:\foldername]</span>

Unix: Wipe full drive.
dd if=/dev/zero of=/dev/<block device> bs=<block size 1M, 32M, etc.> status=progress

Unix: Fill free space.
dd if=/dev/zero of=/path/to/drive/zeros.file status=progress

Unix: Fill free space on FAT32 drive (4GB limit per file).
cat /dev/zero | split -b 2000m - zero -d --additional-suffix=.file

To run the process in background see Run command in background on a Synology NAS with nohup

forfiles – run commands for each file in a location

forfiles allows command line users to run commands for each file in a location. Some of the tasks that the forfiles command can be used to do are deleting old files and renaming files. It a native command in Vista or newer. For WinXP you can find it in the Recource Kit.

Example:

forfiles -p "E:\VideoArchiv" -s -m *.asf -d -01.01.2014 -c "cmd /c echo @path >> E:\del.txt"