I used this:
$(\'input[type=file]\').val()
to get the file name selected, but it returned the full path, as in \"C:\\fakepath\\filename.doc
How about something like this?
var pathArray = $('input[type=file]').val().split('\\'); alert(pathArray[pathArray.length - 1]);