Thanks! stat is great!! :) My R-biased programming can solve the problem by using the following code:
minsize=100 folder="."; files = filter!(r"\.txt$",readdir(folder))[map(filesize,filter!(r"\.txt$",readdir(folder))).>minsize] It solves my problem. But I would appreciate if anyone has any other suggestion to do it in a Julia-style :) Thanks a lot! Best, Charles On 29 October 2015 at 16:25, Yichao Yu <yyc1...@gmail.com> wrote: > stat[1] should have the info you need to write your own filter. > > [1] > http://julia.readthedocs.org/en/latest/stdlib/file/?highlight=stat#Base.stat > > On Thu, Oct 29, 2015 at 11:22 AM, Charles Novaes de Santana > <charles.sant...@gmail.com> wrote: > > Hi julians, > > > > I am using readdir() and filter!() to list files in a folder that match a > > given pattern (lets' say, to list all .txt files). > > > > Now I would like to filter the files according to their sizes. I only > want > > to list non-empty files within a folder, so my first shot is to list > files > > which sizes are higher than zero bytes. > > > > Some days ago there was a thread about listing the last modified file, > that > > used map() and mtime(). Do you know something similar to list files by > size? > > > > Thanks for any tip! > > > > Best, > > > > Charles > > > > -- > > Um axé! :) > > > > -- > > Charles Novaes de Santana, PhD > > http://www.imedea.uib-csic.es/~charles > -- Um axé! :) -- Charles Novaes de Santana, PhD http://www.imedea.uib-csic.es/~charles