Solved

Get files locked by a process and unlock a speciffic file

Posted on 2010-11-24
6
887 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

21 Experts available now in Live!

Get 1:1 Help Now