Solved

Get files locked by a process and unlock a speciffic file

Posted on 2010-11-24
6
897 Views
Last Modified: 2013-12-17
Hi everybody!

I have a to find the list of files locked by a process. The list will be logged for analyse purposes. If the list contains a speciffic file the lock must be released in order to move the file. The locking process must not be killed.

TNX
0
Comment
Question by:Borsec
  • 3
  • 3
6 Comments
 

Assisted Solution

by:Borsec
Borsec earned 0 total points
ID: 34211114
Has anybody any idea?
0
 
LVL 14

Expert Comment

by:systan
ID: 34211459
hi
if you want to move the file?, you can move it directly.
file.move(source, destination);

you don't have to unlock to move the file.
0
 
LVL 14

Expert Comment

by:systan
ID: 34212688
System.IO.File.Move('running1.exe', 'running2.exe');
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Accepted Solution

by:
Borsec earned 0 total points
ID: 34215775
The solution for me can be found under http://sourceforge.net/projects/delfilelock/
0
 
LVL 14

Expert Comment

by:systan
ID: 34218169
Oh, you didn't ask about deleting a locked file, its seems that your doing not right.
anyway carry on.
0
 

Author Closing Comment

by:Borsec
ID: 34237317
No other exper came with a reasonable solution and my solution did the trick.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question