Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find who renamed my folder.

 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

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

Thanks in advance.
 
Winston Gutkowski
Bartender
Pie
Posts: 10226
58
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely there are OS tools that are more appropriate to use rather than trying to write one from scratch in Java?
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean like assigning the folder permissions so that it can only be accessed by a small list of people?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ....
 
Paul Clapham
Sheriff
Pie
Posts: 20945
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all of you guys.

Since the folder is in a shared drive, I think its time to talk to my network dept.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic