DOS/External tool does not delete temporary .bat file
Posted: Fri Jul 23, 2021 1:58 pm
Hi,
When TextPad runs an external DOS command, it creates a tiny TPxxxxxx.bat batch script, and runs that.
I use TextPad frequently on my home laptop, for which I have admin rights, and on my work laptop, where I do not have admin rights (admin rights may or may not be relevant).
Work TP version is 8.4.0, home version is 7.6.4.
I have never noticed any temp .bat files un-deleted on my HOME laptop*, but on my WORK laptop they are consistently NOT being deleted.
If I try and delete manually, Windows tells me something else has them open.
Even if I close down TP, I still cannot delete the temporary .bat file/s. Only after a reboot can I delete them. It's not a big issue, but these files are in a common network location where they take up space (however small), and might be seen by other members of the dept.
What do my external tools do? Home and work follow the same principle (but are different):-
Run my own .bat script, with filename macros etc passed as arguments on the command line.
This in turn runs/connects to Oracle's sqlplus executable - which is a script-able command line interface to issue sql commands to an Oracle database. Work: connect using tnsnames.ora; home: direct connection to XE.
My own .bat file, in this mode, issues a DOS PAUSE command, so I can review the output before it terminates.
I run the self-same .bat file as a 'Captured' tool so the output is captured by TextPad in the Tool Output window.
Only when I run as the external tool does TP's temporary .bat file NOT get deleted. (It was probably never created in the first place for the 'internal' tool.)
Does anybody know what process has hold of the temp .bat files and if it is possible to make sure they DO get deleted?
*I have realised I only run as captured tool on my home laptop, so that might explain why I don't see them on personal use.
Thanks for any suggestions!
Clark
When TextPad runs an external DOS command, it creates a tiny TPxxxxxx.bat batch script, and runs that.
I use TextPad frequently on my home laptop, for which I have admin rights, and on my work laptop, where I do not have admin rights (admin rights may or may not be relevant).
Work TP version is 8.4.0, home version is 7.6.4.
I have never noticed any temp .bat files un-deleted on my HOME laptop*, but on my WORK laptop they are consistently NOT being deleted.
If I try and delete manually, Windows tells me something else has them open.
Even if I close down TP, I still cannot delete the temporary .bat file/s. Only after a reboot can I delete them. It's not a big issue, but these files are in a common network location where they take up space (however small), and might be seen by other members of the dept.
What do my external tools do? Home and work follow the same principle (but are different):-
Run my own .bat script, with filename macros etc passed as arguments on the command line.
This in turn runs/connects to Oracle's sqlplus executable - which is a script-able command line interface to issue sql commands to an Oracle database. Work: connect using tnsnames.ora; home: direct connection to XE.
My own .bat file, in this mode, issues a DOS PAUSE command, so I can review the output before it terminates.
I run the self-same .bat file as a 'Captured' tool so the output is captured by TextPad in the Tool Output window.
Only when I run as the external tool does TP's temporary .bat file NOT get deleted. (It was probably never created in the first place for the 'internal' tool.)
Does anybody know what process has hold of the temp .bat files and if it is possible to make sure they DO get deleted?
*I have realised I only run as captured tool on my home laptop, so that might explain why I don't see them on personal use.
Thanks for any suggestions!
Clark