Update path you want to replace filenames. Example: '/Users/your-username/Documents/screenshots'
Run the scipt with node renameFile.js
Files in the specified path will be renamed with underscores instead of spaces and hyphens.
This script will only rename files in the specified path and not in subdirectories.
MIT