Page 1 of 1 1
Topic Options
#139678 - 2005-05-12 04:26 PM Find files??
suenas Offline
Lurker

Registered: 2005-05-12
Posts: 1
Hey all
I was wondering if there is a way that I can find a certain extention of files on all user machines on their c:\



Like, I would like to find all *.pst files that a user might have on their C:\ and where they are located.. written to a log file.

Does this option exist in Kix? as I was not able to figure it out

Thanks

Top
#139679 - 2005-05-12 04:56 PM Re: Find files??
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I would suggest you just do something like:

shell '%comspec% /c dir /s/b c:\*.pst >c:\dir.txt'

Top
#139680 - 2005-05-12 05:02 PM Re: Find files??
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
there are a number of methods to do this.

  • use a UDF like DIRPlus() the command would look somehting like this.

    Code:

    ;return a list of all PDF's from the C:
    $files = dirplus('c:\','/f pdf /s /a-d')
    $ = open(1,'pdf-log.txt',5)
    for each $item in $file
    $ = writeline(1,$file)
    next
    $ = close(1)



  • or just a simple shell command

    Code:

    shell '%comspec% /c dir /s /b /a-d c:\*.pdf > pdf-log.txt'





also ... how will you be wanting to run the script on all PC's? Via the login script? Or via an admin script that goes out and searches all of the PC's

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
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.044 seconds in which 0.014 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