Jump to content
Sign in to follow this  
Guest paraguma

creating new file in particular path

Recommended Posts

Guest paraguma
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...