Page 1 of 1 1
Topic Options
#157483 - 2006-02-20 05:17 PM Find Files DirPlus
@lejo @rias Offline
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
#157484 - 2006-02-20 06:18 PM Re: Find Files DirPlus
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Then do just a single level DIR, and then make separate calls for each subdir you want.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#157485 - 2006-02-20 07:10 PM Re: Find Files DirPlus
@lejo @rias Offline
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 Administrator Online   shocked
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 Offline
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
#157488 - 2006-02-20 08:21 PM Re: Find Files DirPlus
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
My suggestion, expanded upon with examples from Allen and Bryce, did not preclude the use of the DirPlus() UDF.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#157489 - 2006-02-20 10:53 PM Re: Find Files DirPlus
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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.
 

Top
#157490 - 2006-02-21 03:13 PM Re: Find Files DirPlus
@lejo @rias Offline
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
#157491 - 2006-02-21 08:34 PM Re: Find Files DirPlus
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.057 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org