Click to See Complete Forum and Search --> : Windows local file access via Javascript?
karayan
04-29-2003, 11:01 PM
I need to write a quick application that will access files on Windows (e.g., open/save/rename/move). This app will run locally. I don't want to go full-speed into full-blown app development. Can I use Javascript running on IE to do that? In other words, does JScript provide for such LOCAL file access? If not, what tool do you recommend for me to use to easily and quickly build that app?
Thanks.
George
SniperX
04-30-2003, 12:38 AM
Javascript does not allow you to read, write, open,close files - i heard it was developed to be a secure language.
If you want to use file handles you need to use another language such as PHP asp perl etc.
Or you can just read from a file using html and data binding...
Hope thats what you are looking for
Regards
MW
DrDaMour
04-30-2003, 12:40 AM
you can do it through activeX i'm sure, if you're using IE and it's enabled. Search for ActiveX Scripting.FileSystemObject
<html>
<script>
function ShowFileInfo(filespec){
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFile(filespec);
s = f.DateLastAccessed;
alert(s);
}
ShowFileInfo("c:\\header.txt");
</script>
</html>
if you can get last accessed, i'm sure you can do deletes