Skip to content
Snippets Groups Projects
Commit 50cdcfb0 authored by Marco Ratto's avatar Marco Ratto
Browse files

Check that file exists before copying it

parent 25230060
No related branches found
No related tags found
No related merge requests found
......@@ -36,12 +36,16 @@ for indPC=1:length(Parallel),
if Parallel(indPC).Local==0,
if isunix || (~matlab_ver_less_than('7.4') && ismac),
for jfil=1:size(NamFileInput,1),
if ~isempty(dynareParallelDir(NamFileInput{jfil,2},[PRCDir,filesep,NamFileInput{jfil,1}],Parallel(indPC))),
system(['scp ',Parallel(indPC).user,'@',Parallel(indPC).PcName,':',Parallel(indPC).RemoteFolder,'/',PRCDir,'/',NamFileInput{jfil,1},NamFileInput{jfil,2},' ',NamFileInput{jfil,1}]);
end
end
else
for jfil=1:size(NamFileInput,1)
for jfil=1:size(NamFileInput,1),
if ~isempty(dynareParallelDir(NamFileInput{jfil,2},[PRCDir,filesep,NamFileInput{jfil,1}],Parallel(indPC))),
copyfile(['\\',Parallel(indPC).PcName,'\',Parallel(indPC).RemoteDrive,'$\',Parallel(indPC).RemoteFolder,'\',PRCDir,'\',NamFileInput{jfil,1},NamFileInput{jfil,2}],NamFileInput{jfil,1})
end
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment