Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
06273489
Commit
06273489
authored
Feb 01, 2011
by
Marco Ratto
Browse files
dynare provisions for rmdir under windows
parent
9fdc7a65
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/parallel/dynareParallelRmDir.m
View file @
06273489
...
...
@@ -37,11 +37,21 @@ end
for
indPC
=
1
:
length
(
Parallel
),
while
(
1
)
if
is
unix
if
~
is
dos
stat
=
system
([
'ssh '
,
Parallel
(
indPC
)
.
UserName
,
'@'
,
Parallel
(
indPC
)
.
ComputerName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'/'
,
PRCDir
]);
break
;
else
if
exist
(
'OCTAVE_VERSION'
),
% Patch for peculiar behaviour of rmdir under Windows.
% It is necessary because the command rmdir always ask at the user to confirm your decision before
% deleting a directory: this stops the computation! The Octave native function 'confirm_recursive_rmdir'
% disable this mechanism.
val
=
confirm_recursive_rmdir
(
false
);
[
stat
,
mess
,
id
]
=
rmdir
([
'\\'
,
Parallel
(
indPC
)
.
ComputerName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'\'
,
PRCDir
],
's'
);
else
[
stat
,
mess
,
id
]
=
rmdir
([
'\\'
,
Parallel
(
indPC
)
.
ComputerName
,
'\'
,
Parallel
(
indPC
)
.
RemoteDrive
,
'$\'
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'\'
,
PRCDir
],
's'
);
end
if
stat
==
1
,
break
,
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment