Solved

Get files locked by a process and unlock a speciffic file

Posted on 2010-11-24
6
890 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
3 Use Cases for Connected Systems

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

 

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

3 Use Cases for Connected Systems

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

Question has a verified solution.

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

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.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now