diff --git a/matlab/check_posterior_analysis_data.m b/matlab/check_posterior_analysis_data.m
index 9e2bc14a51d804c9672a363a037775af193057bc..f3f7a66150ef53fd5bfa6f8a47493397f12f660c 100644
--- a/matlab/check_posterior_analysis_data.m
+++ b/matlab/check_posterior_analysis_data.m
@@ -79,8 +79,8 @@ if isempty(pdfinfo)
 else
     number_of_the_last_post_data_file = length(pdfinfo);
     name_of_the_last_post_data_file = ...
-        [ './' M_.dname ...
-          '/metropolis/' ...
+        [ pwd filesep M_.dname ...
+          filesep 'metropolis' filesep ...
           M_.fname '_' ... 
           generic_post_data_file_name ...
           int2str(number_of_the_last_post_data_file) ...
diff --git a/matlab/independent_metropolis_hastings_core.m b/matlab/independent_metropolis_hastings_core.m
index efb50965e05ee5ad386b23afc057e940617f9409..83ec21127c3cf9d9258c5a500582cf939cc9bc05 100644
--- a/matlab/independent_metropolis_hastings_core.m
+++ b/matlab/independent_metropolis_hastings_core.m
@@ -119,7 +119,7 @@ for b = fblck:nblck,
         set_dynare_seed(options_.DynareRandomStreams.seed+b);
     end
     if (options_.load_mh_file~=0)  && (fline(b)>1) && OpenOldFile(b)
-        load(['./' MhDirectoryName '/' ModelName '_mh' int2str(NewFile(b)) ...
+        load([pwd filesep MhDirectoryName filesep ModelName '_mh' int2str(NewFile(b)) ...
               '_blck' int2str(b) '.mat'])
         x2 = [x2;zeros(InitSizeArray(b)-fline(b)+1,npar)];
         logpo2 = [logpo2;zeros(InitSizeArray(b)-fline(b)+1,1)];
diff --git a/matlab/parallel/dynareParallelGetFiles.m b/matlab/parallel/dynareParallelGetFiles.m
index 531594beed4a8d467d892d2d48a7f95562873c9f..578c6733d02201c80b4eb4d48a72be769a1eed76 100644
--- a/matlab/parallel/dynareParallelGetFiles.m
+++ b/matlab/parallel/dynareParallelGetFiles.m
@@ -48,7 +48,7 @@ for indPC=1:length(Parallel),
             end
             if ischar(NamFileInput0),
                 for j=1:size(NamFileInput0,1),
-                    NamFile(j,:)={['./'],deblank(NamFileInput0(j,:))};
+                    NamFile(j,:)={pwd filesep,deblank(NamFileInput0(j,:))};
                 end
                 NamFileInput = NamFile;
             end
diff --git a/matlab/random_walk_metropolis_hastings_core.m b/matlab/random_walk_metropolis_hastings_core.m
index a92c3c21c72f1071f04197f4d3c72033f854bdef..f47e972629df723c219b5b7784ab6d0c5aae345d 100644
--- a/matlab/random_walk_metropolis_hastings_core.m
+++ b/matlab/random_walk_metropolis_hastings_core.m
@@ -142,7 +142,7 @@ for b = fblck:nblck,
         set_dynare_seed(options_.DynareRandomStreams.seed+b);
     end
     if (options_.load_mh_file~=0) && (fline(b)>1) && OpenOldFile(b)
-        load(['./' MhDirectoryName '/' ModelName '_mh' int2str(NewFile(b)) ...
+        load([pwd filesep MhDirectoryName filesep ModelName '_mh' int2str(NewFile(b)) ...
             '_blck' int2str(b) '.mat'])
         x2 = [x2;zeros(InitSizeArray(b)-fline(b)+1,npar)];
         logpo2 = [logpo2;zeros(InitSizeArray(b)-fline(b)+1,1)];