Hi, I am trying to pick files and directories from multiple directories and folders for further processing in my programme logic. I am able to pick majority of the files and directories. However, with -f and all other remaining file operators (that I have already tried so far), I am unable to pick following type of files from the cache folder.

1: /(a directory)/4-http???wscont1.apps.microsoft.co?winstore?1.8x?2d60181a-b6d7-499a-9414-f07b0f932419?AppTile.1.396657.404061.png

2: /(a directory)/4-https???wscont.apps.microsoft.com?winstore?6.3.0.1?100?GB?en-us?MS?467?features1de1406b-b4ec-4d86-9066-68bf9c5d67f2.json

3: (another file path)etc.

Can someone advise, which code to use to pick this type of files being present in 'a directory'?

I am using following code:-

```
for (@files) { $element = $_; if (-d $_) { push @directories, process_files ($_); ++$dir_counter; } elsif (-f $_) { ++$file_counter; next; } elsif ($_ =~ /\.dat$/i || $_ =~ /\.png$/i) { ++$file_counter; next; } else { print NOW "I am in else statement: process_files($_)\n"; } # else loop end
```

In reply to File types not being picked up by script by MShoaib

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.