Jump to content

Force delete a file or directory being used


 Share

Recommended Posts

Do u mean for example deleting a file myprog.exe while its running ?

You cant delete a program while its running.

This will however work

Processclose("myprog.exe")
filedelete(@scriptdir & "\myprog.exe")
Edited by Nova
Link to comment
Share on other sites

Is there a way to force delete a file that is locked by another process?

<{POST_SNAPBACK}>

I mean:

Myprogram.exe is running, and it has a openfile: myfile.dat, and I may not even know which exe is opening the myfile.dat.

I want to force delete myfile.dat

Edited by zzen11
Link to comment
Share on other sites

I mean:

Myprogram.exe is running, and it has a openfile: myfile.dat, and I may not even know which exe is opening the myfile.dat.

I want to force delete myfile.dat

<{POST_SNAPBACK}>

u wont be able to delete it aslong as it is in use by another process.

qq

Link to comment
Share on other sites

You can use one of the UDFs to delete the file once the computer is rebooted. You can also do some creative uses of the program wholockme to find out which program has the file open and kill that program.

<{POST_SNAPBACK}>

Nice program this-is-me ... Thanks for sharing that info

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...