@lejo @rias
(Starting to like KiXtart)
2006-02-20 05:17 PM
Find Files DirPlus

Hi, I use UDF DirPlus
$Files=DirPlus("C:\","/S /a-d")

But takes a lots of time, I need skip some dirs like C:\program files, C:\Windows, C:\winnt. in the search to redeuce the time...

Pls Help.


Les
(KiX Master)
2006-02-20 06:18 PM
Re: Find Files DirPlus

Then do just a single level DIR, and then make separate calls for each subdir you want.

@lejo @rias
(Starting to like KiXtart)
2006-02-20 07:10 PM
Re: Find Files DirPlus

I Need the full funcionality of the UDF but only need reduce the time to search skiping some dirs, it's possible?

AllenAdministrator
(KiX Supporter)
2006-02-20 07:22 PM
Re: Find Files DirPlus

Something like this maybe... (untested)

Code:
 
$dirs=DirPlus("C:\","/ad")
for each $dir in $dirs
if $dir="c:\Program Files" or $dir="C:\windows"
; do nothing
else
$Files=DirPlus($dir,"/S /a-d")
for each $file in $files
;do stuff
next
endif
next



Bryce
(KiX Supporter)
2006-02-20 07:32 PM
Re: Find Files DirPlus

or, use an array of folders for your "Dont scan" list.

Code:

$dontscan = "Program Files","C:\windows","c:\winnt"
$dirs=DirPlus("C:\","/ad")

for each $dir in $dirs
if ascan($dontscan) = -1
;the current folder is not in the dont scan list.

$Files=DirPlus($dir.path,"/S /a-d")
for each $file in $files
;do stuff
next
endif
next



Les
(KiX Master)
2006-02-20 08:21 PM
Re: Find Files DirPlus

My suggestion, expanded upon with examples from Allen and Bryce, did not preclude the use of the DirPlus() UDF.

NTDOCAdministrator
(KiX Master)
2006-02-20 10:53 PM
Re: Find Files DirPlus

Well to be a bit more specific, WHAT are you looking for? There are other methods and tools for finding items on a system that may be much better or faster depending on what you're looking for.
 


@lejo @rias
(Starting to like KiXtart)
2006-02-21 03:13 PM
Re: Find Files DirPlus

Well I need find office (xls, doc, ppt), acrobat (pdf), outlook (pst, pab) files in all Hdd, but EXCLUDE the following dirs:
C:\WINDOWS OR WINNT
C:\PROGRAM FILES\LOTUS\NOTES\DATA
C:\Documents and Settings\%USERS%\Favorites
AND C:\PERSONALDATA

All files I will backup in to another pc.


NTDOCAdministrator
(KiX Master)
2006-02-21 08:34 PM
Re: Find Files DirPlus

create a scheduled task and use command-line RAR/WinZip/7-Zip to create an archive of all those files.

Then it will even support what directory the files came from.

You could also use ROBOCOPY to perform that task and even keep the files mirrored if you want.