Page 1 of 1

How can I release locks on files once they are closed

Posted: Fri Dec 05, 2008 12:10 am
by vimil
Textpad 5.2.0 does not release locks on files once they are closed on WindowsXP.

Try opening a file in textpad and close teh file. Then try to delete the file. Windows throws an error sayng the file is in use by a program or person. Howeevr once textpad is closed teh file can be deleted.

Posted: Fri Dec 05, 2008 8:46 am
by nvj1662
I just tried that with Textpad 5.20 on Windows XP SP2 and the file deleted OK. It works fine for me :)

these are the steps I followed

Posted: Fri Dec 05, 2008 2:37 pm
by vimil
1) Created a folder called 'test' on C drive
2) created a text file called test.txt on C:\test
3) opened test.txt in textpad and modified the file.
4) saved and closed test.txt from textpad (textpad is still open)
5) tried to delete the folder test.

Windows says the folder cannot be deleted as it is in use by another person or program.

I first thought it was the file that was being locked but I was able to delete test.txt. It is the folder that I cannot delete. It seems textpad has lock on the folder the file is present in.

Could you try if the samething happens to you too?
It cant be just me :o

Posted: Fri Dec 05, 2008 3:06 pm
by ak47wong
You're right, TextPad has a lock on the folder because it is the working folder. If you want to delete the folder, open a file in another folder first.

Andrew

Posted: Fri Dec 05, 2008 3:25 pm
by ben_josephs
Or deselect
Configure | Preferences | General | Working folder follows active document
if you're prepared to do without it.

Posted: Fri Dec 05, 2008 5:00 pm
by vimil
Unchecking the 'working folder follows active document' works, but I really like that feature.

I mostly use textpad to track log files. I have log files located at different folders and the 'working folder follows active document' feature saves me a lot of mouse clicks to open another file from a folder that has already a file open.

Is there any reason why textpad has to lock a folder, if it has no open files in that folder?

Posted: Mon Dec 08, 2008 8:57 am
by nvj1662
Just to be clear on my last, I do have "Working folder follows active document" un-ticked. Following your instructions to the letter, I was able to delete the folder OK. Windows just asked for confirmation that I wished to delete the folder to the recycle bin, then did so without further comment.

Posted: Mon Dec 08, 2008 2:28 pm
by vimil
It works fine when the 'working folder follows current document' is un-ticked. But I need that option enabled. Its comes very handy when trying to open other files from a folder that has already a file open in textpad.

Posted: Tue Dec 09, 2008 8:42 am
by nvj1662
You might like to try this www.filehippo.com/download_unlocker/. I have not yet tried it but it claims to unlock file-locked windows files so should work on directories too.

Issue with USB

Posted: Tue Apr 07, 2009 7:31 pm
by OppfinnarJocke
Open a file from an USB-drive
Save the file as a new file on another HD
Try to safely remove the USB-drive

The USB-drive is now locked by Textpad 5.2 even though it has no file open on the drive. Even closing the file (now saved under another name on another drive) does not help. Closing Textpad allows the USB-drive to be safely removed.

Posted: Tue Apr 21, 2009 8:37 pm
by magus424
If you open a file in another directory it will shift the working dir and allow the folder to be removed.