Here is the code:
var object = new ActiveXObject("Scripting.FileSystemObject");
var file = object.GetFile("C:\\My\\Hello.txt");
document.write("File is moved successfully");
<input type="Button" value="Move File" onClick='moveFile()'>
When you load the above html code, you will get a button. On clicking the button, you will find that the file is moved to the destination path.
Liked it! Share this Tutorial