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

Discussion in 'Java' started by master007, Feb 16, 2006.

  1. master007

    master007 Guest

    Hi..
    how to detect file creating and deleting and renaming files
    immediately in java
    please give the answer .....urgently...

    bye...
    frnds...
     
    master007, Feb 16, 2006
    #1
    1. Advertising

  2. master007

    Oliver Wong Guest

    "master007" <> wrote in message
    news:...
    > 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
     
    Oliver Wong, Feb 16, 2006
    #2
    1. Advertising

  3. master007

    Roedy Green Guest

    On 16 Feb 2006 09:34:42 -0800, "master007" <>
    wrote, quoted or indirectly quoted someone who said :

    > 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
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Feb 17, 2006
    #3
  4. master007

    master007 Guest

    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
     
    master007, Mar 5, 2006
    #4
  5. master007

    master007 Guest

    @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
     
    master007, Mar 5, 2006
    #5
  6. master007

    Roedy Green Guest

    On 4 Mar 2006 23:59:03 -0800, "master007" <>
    wrote, quoted or indirectly quoted someone who said :

    >i want to detect file operations in the hard disk....
    >please encourage us...ok


    see http://mindprod.com/jgloss/multiposting.html
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Java custom programming, consulting and coaching.
     
    Roedy Green, Mar 5, 2006
    #6
  7. master007

    Alun Harford Guest

    "master007" <> wrote in message
    news:...
    > 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


    JNI
     
    Alun Harford, Mar 5, 2006
    #7
  8. master007

    Chris Uppal Guest

    master007 wrote:

    > 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
     
    Chris Uppal, Mar 5, 2006
    #8
  9. master007

    Oliver Wong Guest

    "master007" <> wrote in message
    news:...
    > 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


    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
     
    Oliver Wong, Mar 6, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    5
    Views:
    497
    Jawloc
    Feb 27, 2007
  2. Harry Barker
    Replies:
    2
    Views:
    520
    Alf P. Steinbach
    Apr 19, 2006
  3. Chris
    Replies:
    6
    Views:
    709
    Chris Uppal
    Mar 6, 2007
  4. blur959
    Replies:
    1
    Views:
    552
  5. crea
    Replies:
    2
    Views:
    417
    Nobody
    Dec 28, 2012
Loading...

Share This Page