Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

file-paths-win32

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-paths-win32

Find paths of file(s) matching file name(s) on Windows

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

file-paths-win32 NPM version js-standard-style

Find paths of files matching file name on Windows

install

$ npm install --save file-paths-win32

api

returns

Promise is returned with

  • resolve (array) [Array of file paths, empty if not found]
  • reject (error)

arguments

  • filename(s) (string || array)
  • opts (object) optional
    • hints (array - %HOMEPATH% unless file is EXE) [paths to search]
    • full (boolean - false) [search all drives recursively]

usage

const filePaths = require('file-paths-win32')
let fpOpts

// search for single file in default paths
filePaths('someFile.txt').then(console.log).catch(console.error)

// search for single EXE in default executable paths
filePaths('someApp.exe').then(console.log).catch(console.error)

// search for array of files in default paths
filePaths(['someFile.txt', 'someApp.exe']).then(console.log).catch(console.error)

// search for single file in specific paths
fpOpts = {hints: ['C:\\some\\path', 'C:\\some\\other\\path\\']}
filePaths('someFile', fpOpts).then(console.log).catch(console.error)

// search for single file in all drives recursively
fpOpts = {full: true}
filePaths('someFile', fpOpts).then(console.log).catch(console.error)

License

MIT © Andrew Carpenter

Keywords

FAQs

Package last updated on 22 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc