// Extract only the file name.
// Replace File name with lowercase.
// Replace whitespaces with underscores.
let filename: string = "c:\\path\\to\\file\\WITH Whitespace1 and Whitespace2.ts";
filename = filename.replace(/^.*[\\\/]([^\\\/]*)$/i,"$1");
filename = filename.replace(/\s/g,"_");
filename = filename.toLowerCase();
console.log(filename);
/*
run:
"with_whitespace1_and_whitespace2.ts"
*/