Jump to content

RecFileListToArray - Deprecated


Melba23
 Share

Recommended Posts

Hi Melba,

I ran some test on this script on the area of junctions.
Some things I found were:

$iHide_Link is declared as zero, but never changes at any point.
I'm guessing line 129 may be the culprit.

At line 277, the following should be...

If $iHide_Link And BitAND($iAttribs, $iHide_Link) = 0x406 Then

    ContinueLoop

EndIf

otherwise, the value 0x002, which usually signifies an appdata folder, will get omitted.

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

  • Moderators

ripdad.

 

$iHide_Link is declared as zero, but never changes at any point

It will if you set the correct parameter (lines 125-129):

; Check for link/junction omitted
If BitAND($iReturn, 16) Then
    $iHide_Link = 1024 ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    $iReturn -= 16
EndIf
And as it is already set to 0x0400 there should be no need to check the returned value from the BitAND call. :)

From MSDN:

FILE_ATTRIBUTE_REPARSE_POINT 1024 (0x400) A file or directory that has an associated reparse point, or a file that is a symbolic link.

So are you saying that it does not exclude Link/junction folders if you add 16 to $iReturn? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba,

I'm using the script from the zip in the OP.

So, I guess i'm missing something. Different version maybe?

$iHide_Link = 1024, is not in that script.

But this is:

$iHide_HS = 0x406

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

  • Moderators

ropdad,

You are quite right - no idea how that happened. :>

It is now corrected. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 month later...

Hello

I am trying to set a exclude folder filter but i dont get it how to set the filter.

I have also tried it with the GUI Version but it doesnt work either.

I want to search for a file but exclude a folder like this:

Folder to Exclude: serversharefolder

$searchOriginalFile = _RecFileListToArray($pathorg,"file||serversharefolder", 1, 1, 0, 2)

Can someone help me?

Thanks,

Daniel

Link to comment
Share on other sites

  • Moderators

DA4NI,

Welcome to the AutoIt forum. :)

Just use the folder name, not the path: ;)

$searchOriginalFile = _RecFileListToArray($pathorg,"file||folder", 1, 1, 0, 2)
M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi M23

Thanks for your answer :)

But what if de foldername exists several times in other subfolders and i just want to exclude one specific of these folders?

For example:

search for file1 in folder servershare

but exclude this directory serversharefoldersw

serversharefolderswfile1   => exclude

serversharefoldersubfolderswfile1 => include

serversharefoldersubfolder2swfile1 => include

serversharefoldersubfolder3swfile1 => include

Daniel

Link to comment
Share on other sites

  • Moderators

DA4NI,

If you exclude the top folder it is not searched and so you will never get to the subfolders. :(

What I suggest you do is to search for the file in all folders and subfolders starting with serversharefoldersw, but ask for only the relative path to be returned so that you can loop through the returned array and instantly skip any elements that do not have a "" - they will be the returns from the top level folder. You can easily concatenate the search path to the returned value in the other elements to get the full path of the other files. Give it a try and let me know how you get on. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

UDF Deprecated - 23 Dec 2013

As since the release of v3.3.10.0 the basis of this UDF is now included in the standard AutoIt UDFs as _FileListToArrayRec in File.au3, support will end in this thread and any future bug reports or feature requests should be made via Trac. :)

Note that there are a couple of major changes in the new function compared to this UDF:

- You must place the Include|Exclude|Exclude_Folder masks in the single $sMask parameter, delimited by "|". The old syntax with the "exclude" masks at the end of the parameter list will no longer work, unlike this UDF.

- The values returned in @extended in the event of an error have been reordered to reflect the above - so you might need to amend your errorchecking. But note that "no files found" still returns 9 in @extended - I am not that cruel! :D

- The sort algorithm has been changed from QuickSort to DualPivot, which is significantly faster for large arrays. I hope you appreciate the faster return times.

A zip remians available in the first post for those who do not wish to update immediately. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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