title: Access Local Files using a Google Chrome Extension
body: <p>I have asked a similar question to this previously</p>
  
  <p><a href="https://stackoverflow.com/questions/21878079/communicate-with-cash-drawer-from-website">Communicate with Cash Drawer from Website</a></p>
  
  <p>However the question was very vague and I now know what I require is possible using an extension.</p>
  
  <p>This question is similar to the following, however, not quite the information I need.</p>
  
  <p><a href="https://stackoverflow.com/questions/13941556/chrome-extension-and-local-storage">Chrome extension and local storage</a></p>
  
  <p><a href="https://stackoverflow.com/questions/7621822/access-local-files-through-google-chrome-extension">Access local files through Google chrome extension?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8813282/list-a-local-directory-with-chrome-extension">List a local directory with chrome extension</a></p>
  
  <p>What I effectively need to do is run a bat file on the users computer from my website. The users of the site will be employees of the company and the computers they will be using will be provided by us, therefore I can make any necessary changes to the machines for this to work before shipping to the user.</p>
  
  <p>I understand that you can create a local folder on the computer that you can allow chrome to have access to, therefore maintaining security. I have searched for how to do this but cannot seem to nail down what I need to search for and this in particular is where I need help.</p>
  
  <p><a href="http://developer.chrome.com/apps/fileSystem" rel="noreferrer">http://developer.chrome.com/apps/fileSystem</a></p>
  
  <p>I have not yet built an extension but I am willing to take on the challenge so I do not need help with this side of things. The two guides below seem more than ample.</p>
  
  <p><a href="http://lifehacker.com/5857721/how-to-build-a-chrome-extension" rel="noreferrer">http://lifehacker.com/5857721/how-to-build-a-chrome-extension</a></p>
  
  <p><a href="http://css-tricks.com/colorpeek-part-2-building-first-chrome-extension/" rel="noreferrer">http://css-tricks.com/colorpeek-part-2-building-first-chrome-extension/</a></p>
  
  <p>This is where I am currently at.</p>
  
  <pre><code>{
    "name": "Open Till",
    "version":"1",
    "manifest_version": 2,
    "description": "Allow POS Users to Open their Till",
    "browser_action": {
      "default_icon": "icon.jpg"
    }
  }
  </code></pre>
  
  <p>What I need to achieve next is to create a command to call the extension, the extension then to navigate to the local folder that chrome can access to and then execute a batch file. </p>
  
  <p>I realise I could work around the need for the chrome folder by using the npapi plugin</p>
  
  <p><a href="https://developer.chrome.com/extensions/npapi" rel="noreferrer">https://developer.chrome.com/extensions/npapi</a></p>
  
  <p>However, this is apparently a potential minefield so I would not like to do this.</p>
  
  <p>If someone can point me in the right direction of how to create the folder and access the file, this would be most appreciated.</p>