Subroutine that returns a list of subdirectories
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | str |
subroutine list_dirs(str) !! Subroutine that returns a list of subdirectories implicit none character(len = *), intent(in), optional :: str if ( present(str) ) then call execute_command_line("find . -maxdepth 1 -type d -name ""*" // trim(str) // "*"" > " // trim(str) // ".scratch") else call execute_command_line("find . -maxdepth 1 -type d > dirs.scratch") endif return endsubroutine list_dirs