Assalam.

for this to work and as you told me I suppose that the directory TC is in C: drive so TC.exe for example will be in :

C:\TC\BIN

go in this directory and make a copy of the file Dpmiload.exe   
put this file Dpmiload.exe in its place.
go in the directory C:\TC and put there the file ERR.CPP .this is only for the message. you can open it in notepad for example and change it and put any text you want. but it must be in that directory.

Execute TC.EXE and try to open a file wich is not in C:\TC or in its subfolders and you will see the message wich is in the file ERR.CPP.

I haven't try it for all the situations but only for few cases.
I had a problem to find empty space in the file and I succeeded to find just a few and I hope it will not be destroyed by any work of the file.