You can possibly read the clipboard data in some supported browsers:
Is it possible to read the clipboard in Firefox, Safari and Chrome using Javascript?
The problem is with you storing this data on the user's hard-drive. Javascript to my knowledge will not give you access to the user's hard-drive due to security reasons. One way to get around this is to send this data to a server running a php script that will then proceed to read the data and save it to the server's local storage. This php script can be set up to return the full path which was used when saving the file. Your javascript post method can then use this returned path to load it in a browser which will prompt your browser to display the download prompt. Then the user can download the file and save it to their local drive.
It very convoluted but can work.
RE: HTA
HTA only works in IE and is not very popular so you will have some problems finding code resource for the exact tasks that you require. This is some code which I found for reading and writing files to disk
<!--
// CAREFUL -- no error checking
function readFile()
{
var fso, fileHandle, contents, yourfilename;
fso = new ActiveXObject("Scripting.FileSystemObject");
fileHandle = fso.OpenTextFile(document.editor.yourfilename.value, 1);
contents = fileHandle.ReadAll();
if (contents)
document.all("fileContents").value = contents;
fileHandle.close();
}
function writeFile()
{
var fso, fileHandle, yourfilename;
fso = new ActiveXObject("Scripting.FileSystemObject");
fileHandle = fso.CreateTextFile(document.editor.yourfilename.value, true);
fileHandle.write(document.all("fileContents").value);
fileHandle.close();
}
//-->
Then you will have to combine this code to use the window.clipboardData.getData functionality for getting the stored clipboard contents. I have never done HTA so I can't give you any help with that.