Re: Check file is locked?

2009-07-13 Thread Lawrence D'Oliveiro
In message <652cca82-44a3-473f-b640- c2336a9cf...@v15g2000prn.googlegroups.com>, Rajat wrote: > ... my whole idea is to close the wordpad / notepad application so that I > can delete the file and the directory where this file resides. Don't you think the user might have that application open for

Re: Check file is locked?

2009-07-09 Thread Gabriel Genellina
En Thu, 09 Jul 2009 07:53:29 -0300, Rajat escribió: Thanks Tim for the details. Just further on this, my whole idea is to close the wordpad / notepad application so that I can delete the file and the directory where this file resides. With notepad it is no more a problem. But I'm concerned a

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 9, 3:21 pm, Tim Golden wrote: > Rajat wrote: > > The Notepad process information is fine here. However, with wordpad > > the results are not much differentiating: > > > ---­--- > > wordpad.exe pid: 2832 COMP\rajatd > >

Re: Check file is locked?

2009-07-09 Thread Tim Golden
Rajat wrote: The Notepad process information is fine here. However, with wordpad the results are not much differentiating: -- wordpad.exe pid: 2832 COMP\rajatd 1C: File (RW-) C:\WINDOWS\WinSxS\x86_Microsoft.Windows

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 9, 1:21 pm, Tim Golden wrote: > Rajat wrote: > > I've used the Handle.exe and got the following results: > > > ---­--- > > notepad.exe pid: 3540 COMP\rajatd > >     C: File  (RW-)   C:\Documents and Settings\rajatd\Desk

Re: Check file is locked?

2009-07-09 Thread Tim Golden
Rajat wrote: I've used the Handle.exe and got the following results: -- notepad.exe pid: 3540 COMP\rajatd C: File (RW-) C:\Documents and Settings\rajatd\Desktop 10: File (RW-) C:\WINDOWS\WinSxS\x86_Microsoft

Re: Check file is locked?

2009-07-09 Thread Rajat
On Jul 8, 12:45 pm, Tim Golden wrote: > Rajat wrote: > > On Jul 8, 4:57 am, Lawrence D'Oliveiro > central.gen.new_zealand> wrote: > >> In message , Christian > > >> Heimes wrote: > >>> By the way most operating systems don't lock a file when it's opened for > >>> reading or writing or even execut

Re: Check file is locked?

2009-07-08 Thread Nobody
On Tue, 07 Jul 2009 21:31:12 -0700, Rajat wrote: >> > By the way most operating systems don't lock a file when it's opened for >> > reading or writing or even executed. >> >> The general conclusion seems to be that mandatory locking is more trouble >> than it's worth. > > My OS is a windows XP sp

Re: Check file is locked?

2009-07-08 Thread Steven D'Aprano
On Wed, 08 Jul 2009 00:06:11 -0700, Dennis Lee Bieber wrote: > Also, some applications may still have the file open, but Windows > allows one to make copies of that file... Not always though... some applications open files for exclusive read access. -- Steven -- http://mail.python.org

Re: Re: Check file is locked?

2009-07-08 Thread Dave Angel
Rajat wrote: On Jul 8, 4:57 am, Lawrence D'Oliveiro wrote: In message , Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. The general conclusion seems to be that mandatory locking is more troub

Re: Check file is locked?

2009-07-08 Thread Tim Golden
Rajat wrote: On Jul 8, 4:57 am, Lawrence D'Oliveiro wrote: In message , Christian Heimes wrote: By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. The general conclusion seems to be that mandatory locking is more trouble than it's wo

Re: Check file is locked?

2009-07-07 Thread Rajat
On Jul 8, 4:57 am, Lawrence D'Oliveiro wrote: > In message , Christian > > Heimes wrote: > > By the way most operating systems don't lock a file when it's opened for > > reading or writing or even executed. > > The general conclusion seems to be that mandatory locking is more trouble > than it's w

Re: Check file is locked?

2009-07-07 Thread Lawrence D'Oliveiro
In message , Christian Heimes wrote: > By the way most operating systems don't lock a file when it's opened for > reading or writing or even executed. The general conclusion seems to be that mandatory locking is more trouble than it's worth. -- http://mail.python.org/mailman/listinfo/python-l

Re: Check file is locked?

2009-07-07 Thread Christian Heimes
dudeja.ra...@gmail.com wrote: > How to check if a particular file is locked by some application? (i.e. the > file is opened by some application)? It depends on your operating system. By the way most operating systems don't lock a file when it's opened for reading or writing or even executed. Chri

Check file is locked?

2009-07-07 Thread dudeja . rajat
How to check if a particular file is locked by some application? (i.e. the file is opened by some application)? -- Regrads, Rajat -- http://mail.python.org/mailman/listinfo/python-list