Javascript hack code

16/12/2009 12:23

Copy,Move or Delete existing file

Posted by jaiminworld on September 10, 2008

How…


1. Creat a .txt file or open Notepad.
2.Copy below Java Script code in notepad.
3.Save the file as test.htm or test.html as U wish.
4.Open the internet browser (e.g. : IE).
5.Open the test.htm or test.html file.
>> CODE : To Copy file
    <SCRIPT LANGUAGE=”JavaScript”>
    <!–
    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c:\\jw.txt”);
    file.copy(“d:\\test.txt”, true);
    //–>
    </SCRIPT>

 


>> CODE : To Move file
    <SCRIPT LANGUAGE=”JavaScript”>
    <!–
    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c:\\jw.txt”);
    file.Move(“d:\\”, true);
    //–>
    </SCRIPT>

 


>> CODE : To Delete file
    <SCRIPT LANGUAGE=”JavaScript”>
    <!–
    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c:\\jw.txt”);
    file.Delete();
    //–>
    </SCRIPT>

 


Warning :
    Only Some browser supports the javascript. One example is Internet Explorer.
Back