Hi Monnappa,

On Tuesday 02 November 2010 20:49:04 perl_haxor 123 wrote:
> Hi All,
> 
>           I have a directory in which i have multiple files, i have to read
> each one of them and parse the data......but there could be some files
> which are in use by some other program, how can i find which files are in
> use by other program in perl?.......any suggestions would be really
> helpful.
> 

I don't know about Windows, but on UNIX you can use lsof:

http://en.wikipedia.org/wiki/Lsof

This page says that http://en.wikipedia.org/wiki/Process_Explorer is the 
Windows equivalent.

However, you should rethink your strategy. If you want well-behaving processes 
not to step on each others' toes you can use file locking for that.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
First stop for Perl beginners - http://perl-begin.org/

<rindolf> She's a hot chick. But she smokes.
<go|dfish> She can smoke as long as she's smokin'.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to