Executescript not executing...
I have written a procedure which controls the writing of a batch file and executes it through
executescripthere is the command:
executeScriptText/Z/B "C:\\hysplit4\\cluster\\working\\batch_CCONTROL.bat"Although the batch with this command is launched on my computer, it is not the case on other PCs.... is there any known reason why this should happen?
some hints:
- tried to run Igor in Administrator mode, but doesn't work.
- removed the /Z flag, but didn't get an error message.
- here is the function that writes the batch file
Function CCONTROL_batch()
SetDataFolder root:ZeFir:data2use:
NVAR/Z Hours2Cluster=root:ZeFir:Traj_A:variables:Hours2Cluster
NVAR/Z SkipTraj=root:ZeFir:Traj_A:variables:SkipTraj
NVAR/Z SkipEndpoints=root:ZeFir:Traj_A:variables:SkipEndpoints
string Batch_str=""
Batch_str+="cd C:/hysplit4/cluster/working/;"
Batch_str+="echo "+num2str(Hours2Cluster)+" >>CCONTROL;"
Batch_str+="echo "+num2str(SkipTraj)+" >>CCONTROL;"
Batch_str+="echo "+num2str(SkipEndpoints)+" >>CCONTROL;"
Batch_str+="echo C:/hysplit4/cluster/working/ >>CCONTROL;"
Batch_str+="echo 0 >>CCONTROL;"
Batch_str+=";"
Batch_str+="/hysplit4/exec/cluster;"
Make/T/O/N=(ItemsInList(batch_str, ";")) batch_txt
batch_txt = StringFromList(p, batch_str, ";")
Newpath/O/Q BatchPath, "C:hysplit4:cluster:working:"
sleep/s 1
Save/T/G/O/M="\r\n"/P=BatchPath Batch_txt as "batch_CCONTROL.bat"
Killwaves batch_txt
End Function
Thanks!
J-E
May 12, 2017 at 10:43 am - Permalink