added recursive=T to find the .inp files and external=T, as per DNK suggestion, to write R output to file rather than old to memory