Last active
September 6, 2022 06:01
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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