I am new to JavaScript. I need to move a file to another directory using JavaScript. How can simply move that file with JavaScript?
How can I solve this?
I
Tried this code, working perfectly :
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");
}
In your code, issue seems to be in file path "./Docus/". Try to put absolute path and then check.