Can you make a more general code for UNIX systems, where files can have no extensions?