As far as Terminal goes—which is the way I would do it—the command is
`SetFile -a v <files>`. However if any of the files have spaces in
their names (which they might), it's not going to be safe to just do
`SetFile -a v */*/*`. You'll probably need to use an old staple of the
command line, find/xargs.
find -X <folder> -depth 2 -print0 | xargs -0 SetFile -a v
The "-depth 2" option says "only print files whose depth from <folder>
is exactly 2 (i.e. <folder>/*/* but not <folder>/*, although SetFile
is safe to use on files that are already visible)". Change that value
as you wish (+n or -n for greater-than or less-than), or leave it out
for infinite traversal. "-print0 | -0" is what makes it safe with
spaces (-X is also there to work with xargs, to be extra safe).
You could also save this code to an AppleScript file in ~/Library/
Application Support/Quicksilver/Actions to be able to do this to any
folder (to infinite depth, although you could put back the -depth
parameter to set that—it just seems less useful in a generic action,
rather than a one-time command):
on open theFolder
if folder of (info for theFolder) is true then
do shell script "find -X " & (quoted form of POSIX path of
theFolder) & " -print0 | xargs -0 SetFile -a v"
else
do shell script "SetFile -a v " & (quoted form of POSIX path of
theFolder)
end if
return theFolder
end open
change -a v to -a V to make things _in_visible, or `man SetFile` for
more attributes you can set.