Hack: I hacked some code into the EraserDrop v2.1 source to include the ability to wipe the freespace of network devices. This only works if the UNC share using the device name (or even better the IP number and share name) are mapped to a drive letter in Windows. (ex: \\MyNAS\MyShare or \\22.214.171.124\MyShare mapped to z:)
Patch (diff) from the 126.96.36.199 source using WinMergePortable:
919a920 > ; and get network storage devices mapped to a drive letter 921a923 > Local $drivesnet = DriveGetDrive("NETWORK") 927a930,934 > Next > EndIf > If IsArray($drivesnet) Then > For $i = 1 To $drivesnet > $drives = $drives & "|" & $drivesnet[$i]
If that doesn't work for ya, here's a source snippet from the Freespace() function:
Local $drives = "" ; empty variable ; get fixed and removable drives, convert to a string ; and get network storage devices mapped to a drive letter Local $drivesfix = DriveGetDrive("FIXED") Local $drivesrem = DriveGetDrive("REMOVABLE") Local $drivesnet = DriveGetDrive("NETWORK") For $i = 1 To $drivesfix $drives = $drives & "|" & $drivesfix[$i] Next If IsArray($drivesrem) Then For $i = 1 To $drivesrem $drives = $drives & "|" & $drivesrem[$i] Next EndIf If IsArray($drivesnet) Then For $i = 1 To $drivesnet $drives = $drives & "|" & $drivesnet[$i] Next EndIf
Background: I haven't been able to find a free program to wipe the freespace on my NAS device. I had created a large file on my Linux box using the output of /dev/random and then was going to write a VBScript to randomly change it's name and copy it multiple times to the NAS until it's full. I never got around the to the script writing part and in the meantime I ran EraserDrop to wipe the freespace of my local hard drive. I noticed it was doing *exactly* what I was attempting to do creating multiple files to fill the drive up and then deleting them thereby "wiping" the freespace of the target drive. I looked at the AutoIt code and did an internet search on the DriveGetDrive() function and what do you know, they have a NETWORK option. The code just adds to the already existing code by enumerating the drives that show up as a network drives in Windows Explorer and adds them to the dropbox picklist so you can choose them in the program. Pretty simple 'hack' actually.
Outstanding Issue: The EraserDrop code swells by 162KB just by me compiling the original EraserDrop code with or without my code addition. I'm using the latest AutoIt package (v188.8.131.52) to compile with and UPX is compressing the .exe at the end so I don't know how Wraithdu is getting it down to 310KB in size. Not a big deal, just weird.
Testing: Testing here with my local network NAS is sketchy at best. I've had issues for a while now with my gaming rig not playing nice-nice with my NAS on both WinXP and now Win7. Copying large files or the EraserDrop wiping process will be working great and then they randomly quit with a "network resource not found error". I did create a share on my netbook and mapped it to a drive letter on the gaming rig and wiped the entire 120GBs of freespace on the first try with no issues so I know the program works fine and the issue is still with my equipment somewhere. Anyways, don't make this thread abouty my hardware issues, please stay on topic (hacking EraserDrop and wiping NAS drives)
Erik: Thanks for a great little utility! I'll leave the decision to incorporate this code into the main branch up to you.