Hello,
Is there a simple way for pd to read the number of files in a folder?
Thank you!
reading the number of files in a folder
Hello,
Is there a simple way for pd to read the number of files in a folder?
Thank you!
Check out the hcs library on deken. I don't think that there is a Vanilla method for this.
Thank you LiamG,
I am trying linux command but does not seem to work:
bang
|
ls -1 /usr/bin/ | wc -l
|
ggee/shell
|
print
What's the output of the shell command? Usually shell works on the root directory, so you should probably specify the path to the directory you're after... just a thought..
all these commands work on linux:
ls -la /usr/bin/ | grep ^- | wc -l
ls -1 /usr/bin/ | wc -l
du -a /usr/bin/ | cut -d/ -f2 | sort | uniq -c | sort -nr
and many more...
but with shell you just get the file names in the folder like simple ls on linux.
I also tried to get a counter after ggee/shell but that is not working either
@Spyros If you have extended there are parts of this patch that give you the list and indexes the files....... incidentally showing how many files are in the folder. If vanilla you would have to look for other ways.
cart2.pd + tracklist_button.pd
David
A bit over complicated I think. But it is working. Thank you very much @whale-av
You could also write a script with the command you want to use and launch it with [shell]. Python scripts have worked quite well with [shell] for me.
Thank you @alexandros
Oops! Looks like something went wrong!