Get your own Node server
var path = require('path');
//Extract the filename:
var filename = path.basename('/Users/Refsnes/demo_path.js');
console.log(filename);

              
demo_path.js