You can define a function that does that and then call it. Note, there’s no need to cd
into a directory to read it’s contents:
function include_all_files(dir::String)
files = filter!(x -> isfile(x) && endswith(x, ".jl"), readdir(dir)
foreach(include, files)
end
Why do you want to include all the files in a directory in the first place?