I am trying to move a file from one directory to another using JavaScript. I have already tried the code below...
function moveFile(){
var object = new ActiveXObject("Scripting.FileSystemObject");
var file = object.GetFile("C:\\wamp\\www\\phptest.php");
file.Move("C:\\wamp\\");
document.write("File is moved successfully");
}
... which yields this error:
Uncaught ReferenceError: ActiveXObject is not defined
I'm using Chrome, which doesn't support ActiveX.
I have also tried IE-tab and enabling ActiveX features, with no success. Is there another way to move a file from one directory to another, so that it will still work using Chrome?
Thanks!