program funzip use m_unzip implicit none character(len=512)::archive, dir logical::success, file_exists success = .false. if(command_argument_count() < 1 .or. command_argument_count() > 2) then call get_command_argument(0, archive) Print *, "Usage: "//trim(archive)//" []" else call get_command_argument(1, archive) if(command_argument_count() == 2) then call get_command_argument(2, dir) else dir = "." end if inquire(file=trim(archive), exist=file_exists) if(.not. file_exists) then Print *, "Could not locate '"//trim(archive)//"'" end if if(unzip(trim(archive), trim(dir), indexed='/tmp/zip.lst')) then Print *, "Successfully extracted '"//trim(archive)//"'" end if end if end program funzip