Jump to content

Recommended Posts

Posted

I've been using _FileListToArray more and more.  But I'm finding that files in a C:\OEM ("manufacturer's") directory show up, but have no bearing on what I'm processing ... and sometimes even files on C:\Windows.

 

What is a practical way to exclude those results?  (I can live without ever seeing anything on either path, if the method has to be built in at a low level.)

I'm familiar with $FLTAR_NOHIDDEN, which excludes $Recycle.bin ... and $FLTAR_NOSYSTEM, which takes care of volume info, etc. (but not \Windows).

Can directories be forced "hidden"?  Or do I have to post-process the resulting array to remove unwanted elements?

Thanks in advance for suggestions.

 

OEM Dir.PNG

Posted (edited)

From the help file for _FileListToArrayRec, $sMask Parameter

[optional] Filter for result. Multiple filters must be separated by ";"
Use "|" to separate 3 possible sets of filters: "Include|Exclude|Exclude_Folders"
    Include = Files/Folders to include (default = "*" [all])
    Exclude = Files/Folders to exclude (default = "" [none])
    Exclude_Folders = only used if $iRecur = 1 AND $iReturn <> 2 to exclude defined folders (default = "" [none])

 

Edited by Subz
Posted

Did you have a look at parameter $sMask in the help file?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Good point.  I've used it 100 times—even with some complicated include/exclude patterns—and had forgotten about the Exclude Folders.

Thanks for reminding me.  I'm a big fan of Simple.  Yet I was all the way down in File.au3 looking at how the calls are processed.  Another wake up call to the fact that 9 times out of 10, AutoIt already has the feature.

 

 

 

 

Posted

You can be sure that if something was created by Melba23 then it has all the features you'll ever need ;)

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...