Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to detect file creating and deleting and renaming files immediately in java

Reply
Thread Tools

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

 
 
master007
Guest
Posts: n/a
 
      02-16-2006
Hi..
how to detect file creating and deleting and renaming files
immediately in java
please give the answer .....urgently...

bye...
frnds...

 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      02-16-2006

"master007" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      02-17-2006
On 16 Feb 2006 09:34:42 -0800, "master007" <(E-Mail Removed)>
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.
 
Reply With Quote
 
master007
Guest
Posts: n/a
 
      03-05-2006
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

 
Reply With Quote
 
master007
Guest
Posts: n/a
 
      03-05-2006
@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

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-05-2006
On 4 Mar 2006 23:59:03 -0800, "master007" <(E-Mail Removed)>
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.
 
Reply With Quote
 
Alun Harford
Guest
Posts: n/a
 
      03-05-2006
"master007" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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


 
Reply With Quote
 
Chris Uppal
Guest
Posts: n/a
 
      03-05-2006
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



 
Reply With Quote
 
Oliver Wong
Guest
Posts: n/a
 
      03-06-2006

"master007" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting data from the file without deleting the file first crea C++ 2 12-28-2012 11:50 PM
Renaming OS files by file type in python blur959 Python 1 08-12-2010 04:16 PM
Folders not deleting immediately jawloc@hotmail.com ASP .Net 5 02-27-2007 01:59 PM
Deleting a File from Hardrive and Deleting a SubKey in Registry Harry Barker C++ 2 04-19-2006 09:34 AM
Trouble renaming and deleting files rfdjr1@optonline.net Computer Support 4 03-21-2005 03:47 AM



Advertisments