I want to move a txt file from drive c
to drive d
and I found this code by searching but it does not work properly.
please guide me.
Thanks
<html>
<body>
<script language="JScript">
function move() {
var object = new ActiveXObject("Scripting.FileSystemObject");
var file = object.GetFile("C:\\1.txt");
file.Move("d:\\");
console.log("File is moved successfully");
}
</script>
<button onClick="move()">Move File txt</button>
</body>
</html>