{ok, Cwd} = file:get_cwd(). Filelist = filelib:fold_files( Cwd, ".*", true, fun(File, Acc) -> [File|Acc] end, []). io:format("~p", [Filelist]).