[PD] ignore hidden files from hcs/folder_list

Samuel Burt composer.samuel.burt at gmail.com
Tue May 4 15:47:34 CEST 2021

I figured it out on my own. For anyone searching here's a solution.

[hcs/folder_list] outputs the entire pathname and includes hidden files.

[splitfilename] splits the directory from the file and outputs each.

[list fromsymbol] changes a symbol into a list of numbers. The number 46 is
the preceding dot of hidden files.

[route 46] will catch all files starting with a dot. The right outlet
outputs everything else.

[list tosymbol] will reassemble the file name into a symbol.

The rest of the code recombines the path with the reconstituted file name.

Voila! Hidden files are ignored. Is there a simpler solution?

[image: image.png]

On Tue, May 4, 2021 at 9:07 AM Samuel Burt <composer.samuel.burt at gmail.com>

> Hi, all.
> Does anyone have a suggestion to ignore hidden files preceded by a dot?
> hcs/folder_list outputs all the files matching a wildcard pattern. Seems
> like there should be some way to look for files that start with a dot and
> not pass them.
> I'm loading a directory of audio files but there are a ton of ._files.wav
> that were created by OSX. I've got a bunch of audio sample directories like
> this and I could go through and remove all these files, but this software
> will also be used by someone on a Mac, so it's better to just ignore this
> inconvenient OS behavior if possible.
> Thanks!
> Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210504/7e502373/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 122468 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20210504/7e502373/attachment-0001.png>

More information about the Pd-list mailing list