I was looking for a way fill a partition w/ a zeroifed file

ie: cat /dev/zero > /tmp.tmp

On vista I haven't find any solution than to execute this *ugly* script :

cat /mnt/sda2/Users/root/Documents/zerofill.js
var f, fc, n="tmp.tmp";
var t=1;
var l="\0";
var s= 1<<5;
for(var i=0; i < s ;i++) {  l+="\0"; }
fc = new ActiveXObject("Scripting.FileSystemObject");
f = fc.CreateTextFile(n,1);
do { f.Write(l); }while( t ==0 ) ;
WScript.Echo("Ending");
// f.Close();
// fc.DeleteFile(n);
// todo: 700M chuncks

taskmngr.exe lists wscript.exe

MORE

@TaG: JavaScript js

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/h4ERUyz1oGU" frameborder="0" allowfullscreen></iframe>

jscript.txt · Last modified: 2020/09/08 20:44 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki