Guest paraguma Posted November 17, 2005 Share Posted November 17, 2005 I want to develop a small client side application using xml and filesystemobject. where i need to create new file in user's pc on spacific directory (i.e. in program directory in which ther are program accosiated files.)this is my code:<script>var fso = new ActiveXObject("Scripting.FileSystemObject");var a = fso.CreateTextFile("d:\\myFfile.txt", true);//var a = fso.CreateTextFile(newpath, true);a.WriteLine("This is a test2.");a.Close();</script>this code creates file in D:\ drive not in D:\myfolder\. when i change the path d:\myfolder\ but it does not work .so why this happens?anybody can help me Link to comment Share on other sites More sharing options...
Skemcin Posted November 17, 2005 Share Posted November 17, 2005 I do not know if this is going to help specifically with your problem, and maybe your scenario is such that you can assume that your client will have a"d" drive (my "d" drive is my cd, my mac has no "d" drive). But, if you don't know whether or not your client has a "d" drive than your application is not going to be accessible by all your visitors.Having said that, here is how I solved a similar problem a couple years ago.a.) create a txt fileb.) prompt client to download txt filec.) ask client to upload txt filed.) capture the client location of the txt filee.) run your script to create your file whenever you need toWhen I created an application to something similar (in mine, step [e] didn't create a file it ran the exe file my client had) I chose to store the location in a cookie on the client's browser. I typically do not like using cookies, but I felt that a cookie was less intrusive than storing the location in a database.So, those are my thoughts. I am sorry that I am not able to directly help you resolve your issue, but I felt that this insight might help in some fashion. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now