Is it possible to automatically delete the mcrCache directory created by a MATLAB Compiled executable after it terminates?

3 次查看(过去 30 天)
There should be some option in MATLAB Compiler to direct the created executable to remove all the data (CTF extracted) added during the running of the program.
Essentially, there should a mechanism for the executable to clean up the mcrCache directories after termination.

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2025-3-17
The ability to automatically clean up the mcrcache is not available in the MATLAB Compiler.
To work around this issue, you can create a small BAT file that can set up the environment, run the exe and then clean up afterwards.
 
@echo off cls set MCR_CACHE_ROOT=C:\Temp Start complete path to your exe pause rm -r C:\Temp\mcrCache7*
Caveat: If you do this though, I think that subsequent runs of your program might take longer to launch because all the files in the CTF will have to be unpacked and recreated, whereas if you left them it wouldn't have to do that all over again.
 
  1 个评论
Image Analyst
Image Analyst 2016-12-21
If you do this though, I think that subsequent runs of your program might take longer to launch because all the files in the CTF will have to be unpacked and recreated, whereas if you left them it wouldn't have to do that all over again.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Application Deployment 的更多信息

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by