WorkingDir = 'C:\Users\shastry\MathWorks\test_that_results_hatch_B1CYKd';
OutputFolder = fullfile(WorkingDir, 'Tmp');
if ~exist(OutputFolder, 'dir')
mkdir(OutputFolder);
end
Param.Source = WorkingDir;
Param.Target = OutputFolder;
Files=dir(fullfile(Param.Source,'**\*.*'));
Files = Files(~[Files.isdir]);
for k = 1:length(Files)
if contains(Files(k).folder,'debug')
if contains(Files(k).name,'test_that')
CurrentFile = Files(k).name;
exist(CurrentFile,'file')
RenameFile= regexprep(CurrentFile,{'\.'},{''});
exist(RenameFile,'file')
copyfile(fullfile(Param.Source, CurrentFile), fullfile(Param.Target, RenameFile));
end
end
end
4 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743231
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743231
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743241
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743241
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743254
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743254
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743407
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/479315-filecopy-does-t-work#comment_743407
Sign in to comment.