+ Reply to Thread
Results 1 to 6 of 6

Thread: Search File by Ownership

  Share/Bookmark
  1. #1

    Reputation Reputation
    Zoom7000's Avatar
    Join Date
    Feb 2006
    Location
    London
    Posts
    562
    Thank Post
    111
    Thanked 38 Times in 24 Posts
    Rep Power
    17

    Default Search File by Ownership

    Is it possible to search a shared area on the network and only display files with a particular user as the owner? There are 100000s of files in this particular area and searching all of them and sorting by user is a VERY long process, so I'd like to know if there is a program that will allow me to do this.

  2. #2

    Reputation
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    348
    Thank Post
    30
    Thanked 17 Times in 5 Posts
    Rep Power
    13

    Default

    I am interested in this too...

    Would like to be able to compile a report of who owns what files/folders in a shared area
    OR
    go one step further and move/copy files/folder owned by particular users to another location.

  3. #3

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation
    jinnantonnix's Avatar
    Join Date
    Nov 2007
    Location
    Wales
    Posts
    1,471
    Blog Entries
    7
    Thank Post
    45
    Thanked 213 Times in 176 Posts
    Rep Power
    55

    Default

    I wrote a batch file a little while ago to do something similar.
    It was a rush job, so the coding could probably be improved a lot. I will leave that as an exercise for the reader.

    Anyway, if it's useful, here it is.




    @echo off
    echo.>list.txt
    set /p $search=String to search for (e.g. user123):
    for /F "usebackq delims=," %%d in (`dir /b /s *`) do (
    echo Checking file %%d
    cacls "%%d" > acls
    for /f "tokens=2 delims=:" %%a in ('FIND /I /C "%$search%" "acls" 2^>NUL') do call :perms %%a
    )
    del acls
    notepad list.txt
    goto :eof
    :perms
    set count=%~1
    if [%count%] EQU [0] goto :eof
    ::add to file
    echo.>>list.txt
    type acls >> list.txt
    echo.>>list.txt

  4. #4

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation

    Join Date
    Dec 2005
    Location
    East Sussex
    Posts
    1,763
    Thank Post
    54
    Thanked 92 Times in 65 Posts
    Rep Power
    36

    Default

    We bought TreeSize Professional to sort out shared drives, mainly to find the huge files but it also does by user which is incredibly useful. It is a fab program, can't recommend it enough really.

  5. #5

    Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation Reputation

    Join Date
    Aug 2005
    Location
    London
    Posts
    2,817
    Blog Entries
    2
    Thank Post
    75
    Thanked 444 Times in 390 Posts
    Rep Power
    98

    Default

    One "cheat" way to do it which is good if you just want to find the files owned by one or two users is to use the quota management stuff. If you don't have quotas, turn it but set it so it won't deny space to users going over quota.

    When you go into the quota list you'll see each username and the total amount of space they're taking. find the user you're interested in and go to delete the entry. You'll be asked if you're sure and it will then show you a list of files that the user currently owns.

  6. #6

    Reputation
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    348
    Thank Post
    30
    Thanked 17 Times in 5 Posts
    Rep Power
    13

    Default

    To follow up :

    I found this which looks like it could do the job...

    http://www.jam-software.com/filelist..._readme_en.txt

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 36
    Last Post: 02-03-2009, 08:55 PM
  2. Ownership and Permissions
    By TechSupp in forum How do you do....it?
    Replies: 2
    Last Post: 05-10-2007, 10:38 PM
  3. Nasty File Search not Working/Crashes
    By Grommit in forum Windows
    Replies: 4
    Last Post: 15-03-2007, 04:53 PM
  4. Administrators Nasty File Search errors.
    By Kyle in forum How do you do....it?
    Replies: 5
    Last Post: 24-01-2006, 09:53 PM
  5. File ownership pita!
    By SpuffMonkey in forum Windows
    Replies: 13
    Last Post: 02-11-2005, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts