hpc_file_check.lsf 799 B

1234567891011121314151617181920
  1. slash = "/";
  2. if (operatingsystem == "windows") {slash = "\\";}
  3. if(fileextension(file_to_check) == "fsp") {
  4. lockfile = file_to_check+".lock";
  5. if (!fileexists(lockfile)){
  6. load(file_to_check);
  7. status = layoutmode;
  8. if (status == 1) {
  9. write(fname,"IF EXIST \""+curdir+slash+lockfile+"\" exit /b 1");
  10. write(fname,"copy /y NUL "+curdir+slash+lockfile+" >NUL");
  11. write(fname,"\"C:\Program Files\Lumerical\FDTD\bin\fdtd-engine\" -t 32 "+curdir+slash+files{i});
  12. write(fname,"echo del "+curdir+slash+lockfile);
  13. write(fname,"del "+curdir+slash+lockfile);
  14. write(fname,"exit /b 1");
  15. if (operatingsystem == "windows") {break;}
  16. ?"==wrote bat for fsp== "+file_to_check;
  17. }
  18. }
  19. }