Guest ThaoHuynh Report post Posted 01/26/2018 03:27 AM Hi VoiceGuide Team, Can i use relative file path in OpenTextFile function? I also try this code but it's fail. set fso = CreateObject("Scripting.FileSystemObject") set scriptPath = fso.GetParentFolderName(WScript.ScriptFullName) set textFilePath = fso.BuildPath(scriptPath, "localinfo.txt") set fileLocalData = fso.OpenTextFile(textFilePath) sEntireFile = fileLocalData.ReadAll set fileLocalData = Nothing set fso = Nothing set vg = CreateObject("vgServices.CommandLink") vg.Run_ResultReturn $RV_LINEID, sEntireFile set vg = Nothing Thank you for your support. Share this post Link to post
SupportTeam Report post Posted 01/26/2018 07:20 AM The WScript.ScriptFullName will return the VBScript's script filename, not the VoiceGuide callflow's filename. The VBScript's script filename would be seom temporary filename. Use Admin_TraceLogAdd call (http://www.voiceguide.com/vghelp/source/html/com_admin_tracelogadd.htm) to display value in vgEngine log file to let you confirm actual value. The path to VoiceGuide callflow is stored in this $RV: $RV_PathScriptThe above $RV does not include the "\" at the end. (see: http://www.voiceguide.com/vghelp/source/html/resultvariables.htm ) so you can change this line in your VBScript: set textFilePath = fso.BuildPath(scriptPath, "localinfo.txt") to: set textFilePath = fso.BuildPath("$RV_PathScript", "localinfo.txt") Share this post Link to post
Guest ThaoHuynh Report post Posted 01/26/2018 07:58 AM yep, it worked for me. Thank you so so so..... much Share this post Link to post