File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to find who renamed my folder. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to find who renamed my folder." Watch "How to find who renamed my folder." New topic
Author

How to find who renamed my folder.

Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

Hi Guys,

Is there a Java API which can tell me who renamed my folder name ? may be last accessed by ?

Thanks in advance.


Time is what we want the most, but what we use the worst. -- William Penn
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7700
    
  20

Robin John wrote:Is there a Java API which can tell me who renamed my folder name ? may be last accessed by ?

Well, there appears to be a lot more support for this kind of stuff in 1.7, but I'm no expert. You might want to start with java.nio.file.Files.

Also, the behaviour may well vary across systems. Windows ACL style is very different to Unix's.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

Tried all the things in java nio package... couldn't get anything related to "folder last accessed by username / domain" etc.

I have written a code using import java.nio.file.WatchService to watch the folder but in vain... just noticing that someone is changing the folder name and pooof gone..
'm not able to find out who dunnit...

Please help !!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Surely there are OS tools that are more appropriate to use rather than trying to write one from scratch in Java?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

You mean like assigning the folder permissions so that it can only be accessed by a small list of people?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

Most OS filesystems don't journal to the extent that even an OS system call can discover that, and Java's IO packages are designed to be "write once, run anywhere", which limits to lowest common denominator. So don't get too hopeful.


Customer surveys are for companies who didn't pay proper attention to begin with.
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

Robin John wrote:Hi Guys,

Is there a Java API which can tell me who renamed my folder name ? may be last accessed by ?

Thanks in advance.

In windows you can't do so , there is no method in windows which will provide the name (username) of the person who rename your folder, windows has a method which provide the last modified date time ,
last year i was trying to accomplish a task which is quite similar to your task in which i have to identify who has copied what files from my pc but i was said that there aren't any method in windows which will get me that .....there aren't any system call to accomplish this task ....
correct me if i m wrong ....


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Well, no, recent versions of Windows do have the ability to audit access to specified files. As far as I can see from my 45 seconds of research this can be set up by an administrator and audit records get written to a security log.

Whether there's an API to access that security log, I don't know. However I would expect that if you're going to be looking at the security log, you're going to be looking at it via the application which Windows already provides you -- at least I assume there is such an application, my 45 seconds didn't extend to finding that out.
Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

Thanks to all of you guys.

Since the folder is in a shared drive, I think its time to talk to my network dept.
 
 
subject: How to find who renamed my folder.