Skip to content

Instantly share code, notes, and snippets.

@zemmyang
Last active September 6, 2022 06:01
Show Gist options
  • Save zemmyang/b5929453c9f54561ceb839c731bd413f to your computer and use it in GitHub Desktop.
Save zemmyang/b5929453c9f54561ceb839c731bd413f to your computer and use it in GitHub Desktop.
Lumerical FDTD - Script to run all .fsp files in directory to job queue and run
files = splitstring(dir,endl);
for(i=1:length(files)) {
if (findstring(files{i},"fsp") != -1) {
if (fileexists(files{i})) {
?files{i}; # displays the filename to confirm
load(files{i});
addjob(files{i});
# alternatively, this code can also be used to run
# a script on all the fsp files in the directory.
# just change the line above to do something else
}
}
}
runjobs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment