1

I want to make some file operation using Javascript or jQuery like:

  1. File create
  2. File write
  3. File read
  4. Update
  5. Remove/delete

Is it possible to do above stuffs? If possible, from where I can get the idea? Please suggest me.In any end (client/server) how can it be done?i asked this just for know!

6
  • Where - on client side, or on server side? What is your end goal with this? Commented Apr 24, 2011 at 13:07
  • 2
    Assuming you're talking about in the browser: Thank god you can't. If you can, malicious scripts can, too. Commented Apr 24, 2011 at 13:07
  • @delnan hi friend. i'm not finding these for any malicious purpose. So if you predict something like that, you are wrong.Thanks for your comment. Commented Apr 24, 2011 at 13:34
  • @Pekka hi bro, on client and both server side both. I want to know this not for malicious purpose.Dont't predict something like that. Help me.As a new programmer its my curiosity. Commented Apr 24, 2011 at 13:35
  • 1
    I'm not saying you have malicious intents. But browser JS runs in a sandbox for a reason - incredible potential for malware otherwise (heck, even with the sandbox people find ways to abuse it!). Commented Apr 24, 2011 at 13:36

3 Answers 3

2

There are 2 HTML5 APIs of interest.

The File API which allows you to read files (of a users choice). Most modern browsers implement this.

The File Write API which allows you to write to files. No browsers implement this as of now.

I presume you can also use IE only ActiveX controls to do file manipulation on windows.

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

Comments

2

In any end (client/server)

You weren't specific about which server side JS implementation you are using, so for Node.js:

See the file system section of the Node.js documentation

Comments

0

As I can understand from your question you are trying to do file operation at client end. If you are using IE and windows operating system, you can do that using FileSystemObject. This doesn't work for other browser and other operating systems as FileSystemObject is ActivexObject given by Windows. For details refer http://www.codeproject.com/KB/scripting/JavaScript__File_Handling.aspx

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.