in reply to Identifing all filenames over 250 letters long

Assuming you're on Win* and like simple:

dir /s /b c:\* | perl -nE"length() > 250 && say"

Or if you want those with just filenames over 250 chars rather than the whole path:

dir /s /b c:\* | perl -nE"/\\([^\\]+)$/ and length($1) > 250 && say"

(Adjust as appropriate for non-5.10 builds.)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW

Replies are listed 'Best First'.
Re^2: Identifing all filenames over 250 letters long
by Marshall (Canon) on Jul 30, 2009 at 15:57 UTC
    I of course like this one liner! In this case however, I think just print is better
    dir /s /b c: | perl -nE"length($_) > 10 && print"
    as the dir command already puts in new lines so the extra one by "say" (Note to OP: "say" is the 5.10 feature) could be distracting.