1234567891011121314151617181920212223242526 |
- slash = "/";
- if (operatingsystem == "windows") {slash = "\\";}
- rootdir = pwd;
- ######################################################
- # Get local hostname
- if (operatingsystem == "windows") {
- hpc_get_hostname; # variables input: rootdir; output: hostname or break;
- } else { hostname = "test";}
- #######################################################
- fname = rootdir+slash+hostname+"exec.bat";
- if (fileexists(fname)){rm(fname);}
- paths_string = rootdir+endl; # paths are separated by a new line symbol
- hpc_scan_paths; #input: paths_string with initial path;
- #output: paths_string with all paths;
- #can change working directory
- cd(rootdir);
- paths = splitstring(paths_string,endl);
- for(i=1:length(paths)) {
- if (paths{i} != ""){
- curdir = paths{i};
- hpc_curdir_check; # input: curdir, fname; output: none or break;
- }
- }
- write(fname,"exit /b 0");
- cd(rootdir);
|