<p>I have a number of users with multi-megabyte files that need to be processed before they can be uploaded. I am trying to find a way to do this without having to install any executable software on their machines. </p>

<p>If every machine shipped with, say, Python it would be easy. I could have a Python script do everything. The only scripting language I can think of that's on every machine is JavaScript. However I know there are security restrictions that prevent reading and writing local files from web browsers. </p>

<p>Is there any way to use this extremely pervasive scripting language for general purpose computing tasks?</p>

<hr>

<p>EDIT: To clarify the requirements, this needs to be a cross platform, cross browser solution. I believe that HTA is an Internet Explorer only technology (or that the Firefox equivalent is broken).</p>

[{'answer_id': 41191, 'author': 'Scott Bennett-McLeish', 'author_id': 1915, 'author_profile': 'https://Stackoverflow.com/users/1915', 'pm_score': 0, 'selected': False, 'text': '<p>The application that I maintain and develop for work is an <a href="http://msdn.microsoft.com/en-us/library/ms536471.aspx" rel="nofollow noreferrer">HTML Application</a> or <a href="http://msdn.microsoft.com/en-us/library/ms536471.aspx" rel="nofollow noreferrer">HTA</a>, linked with a SQL Server 2005 backend. This allows various security restrictions to be "avoided". All the client-side components in the application are done with javascript, including writing files to locally mapped network drives and loading data into screens/pages in an AJAXy way. </p>\n\n<p>Perhaps HTA could be helpful for your situation.</p>\n'}, {'answer_id': 41226, 'author': 'Blorgbeard', 'author_id': 369, 'author_profile': 'https://Stackoverflow.com/users/369', 'pm_score': 0, 'selected': False, 'text': '<p>For an example of javascript accessing a local file, you might try taking a look at the source of <a href="http://www.tiddlywiki.com/" rel="nofollow noreferrer">TiddlyWiki</a>, specifically the saveFile, mozillaSaveFile, and ieSaveFile functions. Just click the download link, open the html file it sends you, and search for those functions.</p>\n\n<p>Of course, tiddlywiki is supposed to be used as a local file, not served over the web, so the methods it uses may only work locally.. But it might be a start.</p>\n'}, {'answer_id': 41257, 'author': 'xanadont', 'author_id': 1886, 'author_profile': 'https://Stackoverflow.com/users/1886', 'pm_score': 2, 'selected': False, 'text': "<p>Would Google Gears work here?  Yes, users have to install something, but I think the experience is fairly frictionless.  And once it's installed, no more worries.</p>\n"}, {'answer_id': 904300, 'author': 'Ballsacian1', 'author_id': 100658, 'author_profile': 'https://Stackoverflow.com/users/100658', 'pm_score': 0, 'selected': False, 'text': '<p>Why not use a flash uploader? <br><a href="http://swfupload.org/" rel="nofollow noreferrer">http://swfupload.org/</a></p>\n'}, {'answer_id': 3481254, 'author': 'OutputLogic', 'author_id': 128020, 'author_profile': 'https://Stackoverflow.com/users/128020', 'pm_score': 0, 'selected': False, 'text': '<p>Adobe Flex 4 lets you to open and process a file on a local machine:\n <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html#load()" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html#load()</a></p>\n\n<p>It\'s not exactly JavaScript, but hope that helps.</p>\n'}, {'answer_id': 11874159, 'author': 'CgodLEY', 'author_id': 161152, 'author_profile': 'https://Stackoverflow.com/users/161152', 'pm_score': 0, 'selected': False, 'text': '<p>I believe you can accomplish this using the <a href="http://www.html5rocks.com/en/tutorials/file/dndfiles/" rel="nofollow">HTML5 File API</a>.</p>\n\n<p>It is supported in Opera, IE, Safari, Firefox, and Chrome.</p>\n'}, {'answer_id': 51186981, 'author': 'Isaac', 'author_id': 9816472, 'author_profile': 'https://Stackoverflow.com/users/9816472', 'pm_score': 0, 'selected': False, 'text': '<p>you can use <code>fs</code> module from <code>nodeJS</code> to manipulate with filesystem nowadays!</p>\n'}]
['https://Stackoverflow.com/questions/41179', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4262/']