Page 1 of 1

closing a file keeps the file handle opened

Posted: Tue Apr 19, 2005 2:45 pm
by jicman
Greetings!

If I am working with a text file with TextPad and I close that file and I want to move that file to another directory, or rename it, Windows does not allow me to. I have to close TextPad in order for me to move or rename that file. Is there a fix for this? It's very annoying. I am working with TextPad 4.7.3: 32-Bit Edition. By the way, I love TextPad. ;-)

thanks,

josé

Posted: Tue Apr 19, 2005 3:09 pm
by talleyrand
Howdy,

Can you provide some more information? I am running the same version of TP on Windows 2k and I can open a file, edit it, close it and then modify the file via the OS just file. I can even do those things while TP has the file open. Hmmmm I wonder if you have set the "Keep files locked while editing them" checked (Preferences -> File). Still wouldn't explain why you have to close TextPad out though.

Posted: Tue Apr 19, 2005 3:44 pm
by jicman
Well, open a text file, then close it. Go to the windows browser and move that file to another directory. :-) There's your problem. :-) If it does not happen to you, then something is very weird. I am using XP, which may have other problems in itself. I'll try 2K PRO. I wish I could attached a picture, but I do have my "keep files locked while editing them" unchecked.

josé

Posted: Tue Apr 19, 2005 5:06 pm
by talleyrand
cd \tmp
echo foo > test.txt
explorer /e,.
Right clicked the test.txt and chose the TextPad option
Closed the file but left TextPad open
Dragged test.txt into \tmp\textpad folder no problem

I repeated the above steps, this time editing the file in case something special was happening once it was marked as dirty but it worked just fine for me.

Windows 2000 Professional, used to be patched up to date but now it's about 2 months out of whack.

Posted: Tue Apr 19, 2005 5:48 pm
by jicman
Interesting... I haven't tried W2K, yet, but I will. Also, there is one more bit of info that I forgot to mentioned, :-o, the file that I am editing is on a shared drive. :-)

I'll come back with more info. Let me do a few things here...

thanks,

josé

Posted: Wed Apr 20, 2005 8:46 am
by bveldkamp
We sometimes have a similar problem, where the fileserver (win2k) keeps an open file handle to files on a shared drive. We have to use Process Explorer to close that handle (http://www.sysinternals.com/ntw2k/freew ... cexp.shtml).

This is not limited to Textpad however.

Berend

Posted: Wed Apr 20, 2005 1:44 pm
by talleyrand
Yeah, it looks like Process Explorer is what Microsoft recommends for see who has an open file handle.

Posted: Wed Apr 20, 2005 2:39 pm
by jicman
Ok, it makes sense, now. The interesting part is, that if I close TextPad, the file handle closes. So...?

thanks.

josé

same problem for years

Posted: Wed Jul 05, 2006 6:51 am
by scanner
yes, i have this same problem since i know textpad (many years), and it is pretty bothering.

best regards

Posted: Wed Jul 05, 2006 11:25 am
by helios
TextPad needs to keep a handle on files, in order for the feature "Working folder follows active document", to work correctly. The workaround is to open a file from another directory, and then you will be able to rename or move files from the previous directory, without exiting from TextPad.

Posted: Thu Dec 10, 2009 10:53 am
by tilusnet
helios wrote:TextPad needs to keep a handle on files, in order for the feature "Working folder follows active document", to work correctly. The workaround is to open a file from another directory, and then you will be able to rename or move files from the previous directory, without exiting from TextPad.
Is this "Working folder follows active document" a core feature of Textpad or it can be switched off? I personally find the folder renaming functionality more important.

Wouldn't it be a solution that Textpad moves automatically to its own program folder as soon as there are 0 documents open? (The program folder couldn't be renamed anyway since textpad.exe is running)

Posted: Thu Dec 10, 2009 4:08 pm
by ak47wong
tilusnet wrote:Is this "Working folder follows active document" a core feature of Textpad or it can be switched off?
It's an option. On the very first page of the Preferences dialog. :shock:

Andrew

Posted: Mon Feb 15, 2010 2:40 pm
by mgaert2
tilusnet wrote: Wouldn't it be a solution that Textpad moves automatically to its own program folder as soon as there are 0 documents open? (The program folder couldn't be renamed anyway since textpad.exe is running)
This issue is present in Windows 7 still. I want to use that function (not disable it) and still avoid having to close Textpad or open some other file.

I would also say that above is a solution (or move to C:\ or whatever), and should be easy to fix and test: Please do this.