...

View Full Version : actx FSO and GetFolder syntax??



rokosz
07-01-2011, 12:29 AM
Can someone confirm this is bizarre by itself, or bizarre because its not allowed?

the following code works fine: (it creates the directory entry on the local/client machine)



<script language=javascript>
var fso=new ActiveXObject("Scripting.FileSystemObject");
CTF=fso.CreateTextFile("d:\Images\ReducedforUp\CFT.XML",true);


But the following gives me Path Not Found.



var fsd=new ActiveXObject("Scripting.FileSystemObject");
theFolder=fsd.GetFolder("D:\Images\ReducedforUP")
</script>


a little search on forums turns that maybe it wants a trailing slash...



var fsd=new ActiveXObject("Scripting.FileSystemObject");
theFolder=fsd.GetFolder("D:\Images\ReducedforUP\")
</script>


But that's, somehow, even more bizarre, because that give me:
Unterminated String Constant.

If you can guide me, please feel free cover your mouth, point and laugh mockingly....but please enlighten me. thanks.

rokosz
07-01-2011, 12:53 AM
d:\\images\\reducedforUP\\ ....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum