title: Get desktop file icons using NodeJs
body: <p>I am trying to create a desktop launcher application in Electron that reads the number of files in the user's desktop and gathers the information from each file found. I am gathering the files and constructing the path based on the directory, but all I can get is the filenames. I am not sure how to store the file itself and extract the desktop icon from it. I haven't seen many solutions to it, other than using the AxtiveXobject however supposedly certain implementations do not work in the latest nodejs. Here is my code so far. </p>
  
  <pre><code>//requiring path and fs modules
  const path = require('path');
  const fs = require('fs');
  //gets home directory
  const homedir = require('os').homedir();
  //specifies to desktop
  const dir = `${homedir}/Desktop`;
  var walk = require('walk');
  var filepaths = [];
  //storing desktop path
  var desktopDir = dir;
  console.log(desktopDir);
  //gets the desktop files and paths
  function getDesktopFiles(_dir){
      //read directory
      fs.readdir(_dir, (err, files) =&gt; { 
          if (err) 
            console.log(err); 
          else { 
              files.forEach(_file =&gt; { 
              //console.log(_file); 
              let _p = _dir + '/'+_file;
              //changes slashing for file paths
              let _path = _p.replace(/\\/g, "/");
              filepaths.push(_path);
  
            }) 
          } 
      }) 
      for(let p of filepaths){
          console.log(p);
      }
  
  }
  
  getDesktopFiles(desktopDir);
  </code></pre>