User Tag List

  1. altoiddealer's Avatar
    I would like to know if Javascript can be used to move a file from one directory to another.

    That's all!

    If anyone knows a widget that does something like this, or has any suggestions on how I might accomplish this, that would also be great.

    Many thanks in advance!
    2012-12-31 04:17 AM
  2. King_O_Hill's Avatar
    A quick google search will show you how to use the move command:

    <SCRIPT LANGUAGE=”JavaScript”>

    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c\jw.txt”);
    file.Move(“d\”, true);

    </SCRIPT>
    Last edited by King_O_Hill; 2012-12-31 at 06:10 AM.

    Check out WW3 for iOS 9/10 - Widget-Weather 3.0
    2012-12-31 06:07 AM
  3. altoiddealer's Avatar
    A quick google search will show you how to use the move command:

    <SCRIPT LANGUAGE=”JavaScript”>

    myActiveXObject=new ActiveXObject(“Scripting.FileSystemObject”);
    file = myActiveXObject.GetFile(“c\jw.txt”);
    file.Move(“d\”, true);

    </SCRIPT>
    Oh I searched for a bit, and I did come across that one

    That does do exactly what I want. However I believe that code requires "ActiveX", which is supported in browsers like Internet Explorer. I don't think that will work in my widget... but I may be wrong. Can anyone clarify that?

    Thanks for the quick response KotH
    2012-12-31 01:38 PM
LINK TO POST COPIED TO CLIPBOARD