SO fiddle
Test Fiddle mainly for SO Questions
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/overcast/jquery-ui.css">
JavaScript
function getPath(url) {
return decodeURIComponent(url).replace("file:///","").replace(/\//g,"\\");
}
alert(getPath("file:///C://Program%20Files//Microsoft%20Office//OFFICE11//EXCEL.EXE"));