Solved

Get files locked by a process and unlock a speciffic file

Posted on 2010-11-24
6
896 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

856 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