Solved

Get files locked by a process and unlock a speciffic file

Posted on 2010-11-24
6
898 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

719 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