I do almost all of my actual coding work in "temporary" directories that are stored on my RAM disk (speed, fragmentation is not an issue at all compared to physical disk drives). When I am done with a project/directory, my habit is to copy the contents of that directory back to a physical hard disk and then delete the temporary directory as a clean-up step. Here is a sample command sequence illustrating the problem:
As you can see, TCC PID 4136 still has a "handle" on that directory, but I have three non-elevated TCC command sessions open, and I know of no way determine which of those sessions has the actual "handle" on that directory that should either be freed or that session closed. And I will also add that, since I am a heavy "multitasker", I can have as many as 10 to 12 TCC sessions active at any one time (I have one open for basically every "project" that I am working on concurrently, where a "project" is a series of commands that are repeatedly executed in a general sequence on a basically one-time only basis so "command history" but no .btm file is involved, not necessarily a "programming project".) So some argument such as an asterisk, for example, ("Echo PID
[*]") to indicate the PID of the current TCC session would really be useful.
Code:
[Z:\]rd SampleDirectory
TCC: (Sys) The process cannot access the file because it is being used by anoth
r process.
"Z:\SampleDirectory"
[Z:\]handle SampleDirectory
Handle v3.46
Copyright (C) 1997-2011 Mark Russinovich
Sysinternals - www.sysinternals.com
tcc.exe pid: 4136 type: File 4A4: Z:\SampleDirectory
[Z:\]tasklist tcc*
712 tcc TCC Prompt
2912 tcc TCC Prompt
4136 tcc TCC Prompt
496* tcc Administrator: TCC Prompt - tasklist tcc*
[*]") to indicate the PID of the current TCC session would really be useful.