#157483 - 2006-02-20 05:17 PM
Find Files DirPlus
|
@lejo @rias
Starting to like KiXtart
Registered: 2003-09-02
Posts: 100
Loc: Medellin, Colombia
|
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.
|
Top
|
|
|
|
#157485 - 2006-02-20 07:10 PM
Re: Find Files DirPlus
|
@lejo @rias
Starting to like KiXtart
Registered: 2003-09-02
Posts: 100
Loc: Medellin, Colombia
|
I Need the full funcionality of the UDF but only need reduce the time to search skiping some dirs, it's possible?
|
Top
|
|
|
|
#157486 - 2006-02-20 07:22 PM
Re: Find Files DirPlus
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4545
Loc: USA
|
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
Edited by Allen (2006-02-20 07:28 PM)
|
Top
|
|
|
|
#157487 - 2006-02-20 07:32 PM
Re: Find Files DirPlus
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
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
|
Top
|
|
|
|
#157490 - 2006-02-21 03:13 PM
Re: Find Files DirPlus
|
@lejo @rias
Starting to like KiXtart
Registered: 2003-09-02
Posts: 100
Loc: Medellin, Colombia
|
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.
_________________________
Look always 4 the best...
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|