"KJ" wrote in message <ofh6nk$ebc$
1...@newscl01ah.mathworks.com>...
Dear KJ,
1. Status - Logical value is zero means, no folder/path
can you please try following script. I was used R2010b. It is working from my side.
I write it new script because I don't have input here given m-script- listing, root, files variables.
I was looking into current directory "Array_Script.m"
clc;
clear;
files_list = dir('*.m');
dest_path = uigetdir(pwd,'Select destination folder (D:\....\Saravanan)');
% user can specify the directory.
% dest_path = pwd;
% dest_path = 'C:\....\foldername';
for n=1:length(files_list)
file_name = (files_list(n).name);
% Searching Array m-script from current directory
if (~isempty(regexp(file_name,'Array','once')))
dest_file_name = [dest_path '\' file_name];
[status,msg,msgid] = copyfile(file_name,dest_file_name,'f');
else
dest_file_name = [dest_path '\' file_name];
[status,msg,msgid] = copyfile(file_name,dest_file_name,'f');
end
end
Please let me know if you have any concern
Thanks & Regards,
Saravanan