1

I wanna do some thing like this: 1 - user insert a name 2 - after that i create a file white the user inserted name, and save file in user drive, like c drive. i need to do this using java script, but i have no idea about it, i saw some example about filesystem in Html5, but this approach, at the final, make u download the file, but i want to save this in a specified place by my self. can u give me some guide or some document about this filed? foe example i try this: http://www.noupe.com/design/html5-filesystem-api-create-files-store-locally-using-javascript-webkit.html but because i can't understood it.

9
  • jsfiddle.net/UselessCode/qm5AG like this way.. Commented Apr 30, 2015 at 7:30
  • You should check out this question. stackoverflow.com/questions/7160720/… Commented Apr 30, 2015 at 7:30
  • Don't think you can directly write to a folder on the user's computer. You can only prompt the browser to download a file which will go into the downloads folder 99% of the time. Commented Apr 30, 2015 at 7:37
  • tnk u both, but this links crest/talk about how to crate file and give it to user, i want crest file in a specified place, whit out make user download any thing, if I want say it in simple way, my user press some button and a file will be create in(for example) : C:\mytemp\a.txt @user3588674 @/mubashir-abbas Commented Apr 30, 2015 at 7:38
  • @123 what if there is no C:? What if someone decides to create a 100GB file in your C:? Commented Apr 30, 2015 at 7:52

2 Answers 2

1

You can't access a user's file system. The best you can do is use localStorage for normal browsers or cookies.

Sign up to request clarification or add additional context in comments.

7 Comments

u know, in my own, i accepted ur words and i believe them, but i was talking to my proff and he mentioned this, and told me u can create a file like this, and in this way, but he simply don't explain it.
@123 No, you can't. If you could then the web would be a complete anarchy (not that it kind of isn't already).
you can download files from JS, you just can't specify the folder they are created in.
@dandavis yes, js let u create a temp file and give it to user, and then user must download the file.
perhaps your prog was meaning cookies? just a thought. Thank goodness JS cannot just write files to our system willy-nilly.
|
0

OK, OK OK, tnk every body who came here and put there time to answer my question. finally after a week, yesterday, i went to have some talk with my professor, and he smiled at me, and say u can't find it, bcz js don't have this access and i just need to see my student research about some thing, some thing with false answer.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.