I rarely use tcsh, but you should be able to achieve what you want using the globdot option1:
globdot (+)
If set, wild-card glob patterns will match files and directo‐
ries beginning with `.' except for `.' and `..'
So
#!/bin/tcsh
set globdot
foreach current ($1:q/$run_folder:q/*)
printf '%s\n' $current:q
end
Beware it errors out with a No match error if there's no non-hidden file in the directory.
That can be worked around by including a wildcard known to match along with *:
#!/bin/tcsh
set globdot
set files = (/de[v] $1:q/$run_folder:q/*)
shift files
foreach current ($files:q)
printf '%s\n' $current:q
end
BTW, the correct syntax for bash would be:
#! /bin/bash -
shopt -s nullglob dotglob
for current in "$1/$run_folder"/*; do
printf '%s\n' "$current"
done
You had forgotten the quotes around your expansions, that echo can't be used for arbitrary data, and that by default non-matching globs are left unintended. The dotglob option (equivalent of csh/tcsh/zsh's globdot option) avoids the need for those 3 different globs.
Notes:
- The
(+) indicates that the feature is "not found in most csh(1) implementations (specifically, the 4.4BSD csh)"