-Notepad & deleting a folder

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
holde
Junior Member
Junior Member
Posts: 88
Joined: 2013-09-23, 11:31 UTC

-Notepad & deleting a folder

Post by *holde »

- create a new folder, eg. d:\test
- cd to that folder within of TC
- open Notepad (the link within of TC)
- leave the folder ( cd .. ) and try to delete that new created folder

As long as notepad is running you cannot delete that folder.
A bug or a feature?
Since notepad seems to remember the last used path (eg K:\) it wants to save the file per default there. So it cannot be a feature.

I would like to be able to save my notepad file exactly there where it was opened (d:\test). Since TC doesn't seem to have a chance to set that folder as the default folder for notepad (for that opened new file) why does it start notepad from d:\test?

Please execute it from the temp folder or within of 'my documents'.

Or do I miss something and that behaviour is intented?

(tested on Win 7, 64 bit, TC 8.01/8.50)
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Hello holde,
If I understand right, you are starting notepad from d:\test\ which becomes notepad's current directory. That does not mean it must be shown in notepad's save dialog as the path to save files to. You can perhaps test this behavior by actually saving a file within notepad to d:\ and check if d:\test\ is still blocked. This is normal behavior - executable files are started from the path where you currently are within TC and they set this as their current directory.

If you want to start files from a different directory you can add them to the Button Bar or Start Menu and set their Start Path in the Button Bar / Start Menu configuration.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3379
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

>Or do I miss something and that behaviour is intented?
Yes thats intended from Windows and works on XP too... as long as an application uses a folder it cant be deleted...
Hoecker sie sind raus!
holde
Junior Member
Junior Member
Posts: 88
Joined: 2013-09-23, 11:31 UTC

Post by *holde »

>If you want to start files from a different directory you can add them >to the Button Bar or Start Menu and set their Start Path in the Button >Bar / Start Menu configuration.

I think you misunderstand me. I am talking of the default button of the notepad on the default bar of TC with the default values.
Why should TC start notepad within of the current directory? This gives no additionally functionality and is causing only problems.

I try to answer myself:
These shortcuts are for general usage. It is possible to use it the way i want.
And that the notepad is behaving so - this is not the problem of TC?!

But nevertheless - why these default values for the notepad?!
If I would have set the link then i can blame myself. But it wasn't me (if i remember correctly).
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

holde,
Often you start some program with current directory to be able to open files from it w/o changing directory, it is quite useful. Unfortunately Windows Vista+ things that it is very smart and opens its default folders instead...

When you leave start path field of a button empty, TC starts this program using current directory as working one. So you can set any path if you don't like it.

And, as it was mentioned, Windows doesn't allow removing folder with open handle.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is in fact a Windows feature. Try the same with Explorer, and it will fail to delete the directory too.
Author of Total Commander
https://www.ghisler.com
Post Reply