Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

how to detect file creating and deleting and renaming files immediately in java

Thread view: 
master007 - 16 Feb 2006 17:34 GMT
Hi..
how to detect file creating and deleting and renaming files
immediately in java
please give the answer .....urgently...

bye...
frnds...
Oliver Wong - 16 Feb 2006 17:40 GMT
> Hi..
> how to detect file creating and deleting and renaming files
> immediately in java
> please give the answer .....urgently...

   Question is vague. Do you want to be able to detect files created
anywhere in the universe? Probably not... What about files created anywhere
on the internet? That's also probably not feasible. Files created anywhere
on local network? Now we're entering the realm of possibility... Files
created anywhere on the same computer? On the same disk drive? In the same
folder? From a specific list of files that are being watched?

   - Oliver
master007 - 05 Mar 2006 07:59 GMT
Hi....

i want to detect file operations in the hard disk....
please encourage us...ok
iam doing searcher.
if i have this facility...i don't need to scan the hard disk again...
i think u get me...
sorry if i talk something rudely...
but try to solve if u know....otherwise try to know solution for
quesion...
           but don't comment....
Thanks!!!
sorry Sir..
bye..take care
Roedy Green - 05 Mar 2006 15:23 GMT
>i want to detect file operations in the hard disk....
>please encourage us...ok

see http://mindprod.com/jgloss/multiposting.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Alun Harford - 05 Mar 2006 16:29 GMT
> Hi....
>
[quoted text clipped - 10 lines]
> sorry Sir..
> bye..take care

JNI
Chris Uppal - 05 Mar 2006 16:41 GMT
> i want to detect file operations in the hard disk....

This is inherently OS-specific (if, indeed, it is possible it at all).   So
probably the easiest thing to do is to write/find/buy a little (OS-specific)
program (written in whatever OS-specific language you like) which uses the OS
features to watch for filesystem changes.  It continually writes a list of the
changed files to its stdout (don't forget to flush()!).  Your Java program can
start that off, and read the ongoing stream of filenames (etc) from a
background thread.

Alternatively, you could poll the filesystem from Java.  But unless you are
either looking at a very small number of files, or polling very infrequently,
then you risk putting too high a load on the machine.

   -- chris
Oliver Wong - 06 Mar 2006 19:30 GMT
> Hi....
>
[quoted text clipped - 10 lines]
> sorry Sir..
> bye..take care

   I'm not sure what you mean by "try to know solution for quesion... but
don't comment...", so if you didn't want me to reply to this, I apologize,
and you can ignore the rest of this message.

   Probably, rather than trying to detect file operations on the hard disk,
you're more interested in detecting file operations on the file system. The
distinction is important, because a single file system might span more than
one hard disk (or it might span less than a single hard disk), and a hard
disk might contain data in a filesystem that is not understood by the OS the
JVM is currently running in.

   As Chris has mentioned, your best bet to do this only in Java is to poll
the file system, looking for files. Unfortunately, this won't allow you to
detect changes "immediately". Rather, you'll detect the files when you
actually do the polling.

   - Oliver
master007 - 05 Mar 2006 07:59 GMT
@Oliver

Hi....

i want to detect file operations in the hard disk....
please encourage us...ok
iam doing searcher.
if i have this facility...i don't need to scan the hard disk again...
i think u get me...
sorry if i talk something rudely...
but try to solve if u know....otherwise try to know solution for
quesion...
           but don't comment....
Thanks!!!
sorry Sir..
bye..take care
Roedy Green - 17 Feb 2006 06:08 GMT
> how to detect file creating and deleting and renaming files
>immediately in java
> please give the answer .....urgently...

see http://mindprod.com/projects/filefinder.html

see also http://mindprod.com/jgloss/google.html#DESKTOP

Google Desktop monitors the creation or update of all files and has a
plug-in API
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.