Although I linked to a possible dupe in the comments, it's a pure JavaScript solution. Here's a jQuery version if you like: jsFiddle example
$("input[name=file1]").change(function() {
var names = [];
for (var i = 0; i < $(this).get(0).files.length; ++i) {
names.push($(this).get(0).files[i].name);
}
$("input[name=file]").val(names);
});