01.<script type="text/javascript">
02. // initialize ActiveXObject and create an object of Scripting.FileSystemObject.
03. var fso = new ActiveXObject("Scripting.FileSystemObject");
05. // returns the folder object associated with the specified folder
06. var folderObj = fso.GetFolder("C:\\Temp");
07. document.write(folderObj.Name);
08.
09. fso = null;
13.</script>
I get an error saying "Row 3 Character 1 Identifier Expected".
The script displays only '01.' (the apostrophes are not displayed)
I thought maybe there was a security issue with ActiveX so I run another script wich uses ActiveX, and it both reads and writes local files, and also does a http.open using ActiveX working perfectly.
I'm a beginner in Javascript, trying to make a script that lists all folders and files, starting with the specified folder.
Environment is: Windows 7, Xampp(apache, mysql etc) IE9.
So what's wrong ?
Regards
Last edited by brad jones; 04-26-2012 at 02:30 PM.
Reason: removed name
Bookmarks