how to delete .dll file in Matlab?

14 views (last 30 days)
Hossam Elbaz
Hossam Elbaz on 21 Jul 2020
Answered: Puru Kathuria on 12 Aug 2020
After Code Generation a dll file is created in slprj folder and to regenerate code I must delete this slprj folder, the matlab refuses to delete the folder as it contains a dll file
so please how to delete any dll file in Matlab as the only way to delete is to close Matlab then delete the required files and folders then open Matlab again
  1 Comment
stozaki on 3 Aug 2020
What about using the "s" option of rmdir?

Sign in to comment.

Answers (1)

Puru Kathuria
Puru Kathuria on 12 Aug 2020
function [ st, msg ] = cmd_rmdir( folderspec )
% cmd_rmdir removes a directory and its contents
% Removes all directories and files in the specified directory in
% addition to the directory itself. Used to remove a directory tree.
narginchk( 1, 1 )
dos_cmd = sprintf( 'rmdir /S /Q "%s"', folderspec );
[ st, msg ] = system( dos_cmd );
Please try the above mentioned function if you are using Windows.
For more information on rmdir check out this link.




Community Treasure Hunt

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

Start Hunting!