DumpSave'ing while lengthy program runs
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
tldr: is there a way to load all files following a structure/append to DumpSave file
i would like to run a script following the structure:
Get['lib.wl']
data = initializeDataSet
DumpSave['save0', data]
result1 = compute1
DumpSave['save1', result1]
Clear[result1]
.
.
.
resultn = computen
DumpSave['saven', resultn]
Clear[resultn]
is there a good way to load all saves without going >>save0 to >>saven. Or is this manual work needed? A Get[name]
where name allows for joker would suffice, but I don't think it exists. Putting them into a separate folder seems sensible.
Just saving at the end doesn't seem viable/safe to me in case of an unexpected early exit.
Edit: just discovered FileNames
is a thing.
the solution would be like:
names = FileNames[pattern,directory]
Do[Get[fileName], fileName, names]
save get dumpsave
add a comment |Â
up vote
6
down vote
favorite
tldr: is there a way to load all files following a structure/append to DumpSave file
i would like to run a script following the structure:
Get['lib.wl']
data = initializeDataSet
DumpSave['save0', data]
result1 = compute1
DumpSave['save1', result1]
Clear[result1]
.
.
.
resultn = computen
DumpSave['saven', resultn]
Clear[resultn]
is there a good way to load all saves without going >>save0 to >>saven. Or is this manual work needed? A Get[name]
where name allows for joker would suffice, but I don't think it exists. Putting them into a separate folder seems sensible.
Just saving at the end doesn't seem viable/safe to me in case of an unexpected early exit.
Edit: just discovered FileNames
is a thing.
the solution would be like:
names = FileNames[pattern,directory]
Do[Get[fileName], fileName, names]
save get dumpsave
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
tldr: is there a way to load all files following a structure/append to DumpSave file
i would like to run a script following the structure:
Get['lib.wl']
data = initializeDataSet
DumpSave['save0', data]
result1 = compute1
DumpSave['save1', result1]
Clear[result1]
.
.
.
resultn = computen
DumpSave['saven', resultn]
Clear[resultn]
is there a good way to load all saves without going >>save0 to >>saven. Or is this manual work needed? A Get[name]
where name allows for joker would suffice, but I don't think it exists. Putting them into a separate folder seems sensible.
Just saving at the end doesn't seem viable/safe to me in case of an unexpected early exit.
Edit: just discovered FileNames
is a thing.
the solution would be like:
names = FileNames[pattern,directory]
Do[Get[fileName], fileName, names]
save get dumpsave
tldr: is there a way to load all files following a structure/append to DumpSave file
i would like to run a script following the structure:
Get['lib.wl']
data = initializeDataSet
DumpSave['save0', data]
result1 = compute1
DumpSave['save1', result1]
Clear[result1]
.
.
.
resultn = computen
DumpSave['saven', resultn]
Clear[resultn]
is there a good way to load all saves without going >>save0 to >>saven. Or is this manual work needed? A Get[name]
where name allows for joker would suffice, but I don't think it exists. Putting them into a separate folder seems sensible.
Just saving at the end doesn't seem viable/safe to me in case of an unexpected early exit.
Edit: just discovered FileNames
is a thing.
the solution would be like:
names = FileNames[pattern,directory]
Do[Get[fileName], fileName, names]
save get dumpsave
edited Aug 30 at 8:30
Johu
2,461827
2,461827
asked Aug 29 at 14:29
Gladaed
777
777
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45
add a comment |Â
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
6
down vote
accepted
You can use Get/@ FileNames["save*"]
.
add a comment |Â
up vote
5
down vote
Get /@ StringTemplate["save``"] /@ Range[1, 5]
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
You can use Get/@ FileNames["save*"]
.
add a comment |Â
up vote
6
down vote
accepted
You can use Get/@ FileNames["save*"]
.
add a comment |Â
up vote
6
down vote
accepted
up vote
6
down vote
accepted
You can use Get/@ FileNames["save*"]
.
You can use Get/@ FileNames["save*"]
.
answered Aug 29 at 14:35
Henrik Schumacher
36.7k249103
36.7k249103
add a comment |Â
add a comment |Â
up vote
5
down vote
Get /@ StringTemplate["save``"] /@ Range[1, 5]
add a comment |Â
up vote
5
down vote
Get /@ StringTemplate["save``"] /@ Range[1, 5]
add a comment |Â
up vote
5
down vote
up vote
5
down vote
Get /@ StringTemplate["save``"] /@ Range[1, 5]
Get /@ StringTemplate["save``"] /@ Range[1, 5]
answered Aug 29 at 14:35
Johu
2,461827
2,461827
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f180849%2fdumpsaveing-while-lengthy-program-runs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
please add you solution as an answer rather than part of the question?
â chris
Aug 30 at 8:45