This article explains why you should not delete the transfer's own queue entry in Transfer End Processing.
Do not delete queue entry in Transfer End Processing.
Take care when using xcomend.bat or xcompp.bat.
There are two batch files/scripts which can optionally be invoked (xcom.glb) after XCOM ended the data transfer:
They can be used for various purposes after a transfer ended. But remember that, for xcom, the transfer itself is still not ended and the queue entry belonging to it is still used. Therefore it is strongly suggested NOT to delete that queue entry from within these batches/scripts. This can cause unpredictable results.
To shorten the time that entries are held in the queue, you can use a smaller value for EXPIRATION_TIME in xcom.glb.