in reply to Re: How do I test to see if another process is writing to a file (in Windows) (!share)
in thread How do I test to see if another process is writing to a file (in Windows)
Tye,
Thanks for the pointer. This is exactly what I needed. However, I'm having problems using createFile. If I open the file "a.out" in an editor (Textpad or Notepad) and then run the following:
$status is always true. I can't get createFile to "die". Any ideas?#!/usr/bin/perl -w use strict; use Win32API::File 0.08 qw( :ALL ); my $status = createFile( "a.out", "w ke", "r" ) or die "Can't get exc +lusive access to file: $^E\n"; if ( $status ) { print "Got it!\n"; }
Thanks,
Jay
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How do I test to see if another process is writing to a file (in Windows) (!share)
by tye (Sage) on Sep 25, 2007 at 07:46 UTC | |
Re^3: How do I test to see if another process is writing to a file (in Windows) (!share)
by goibhniu (Hermit) on Sep 27, 2007 at 15:47 UTC |
In Section
Seekers of Perl Wisdom