• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to find who renamed my folder.

 
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !!!
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 27211
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Saloon Keeper
Posts: 25466
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 27211
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic