VoiceGuide IVR Software Main Page
Jump to content

Results File Quandary

Recommended Posts

I have a script, that has been running well for some time. I started working on another script in a different directory of the scripts directory. I allocated one phone line for testing, and started churning some code. All of the sudden, the first script stopped working. Upon investigation, I discovered that my executables in the first script directory were putting their run results files into the new script's directory. I have solved the problem by putting the full path name into the "fopen" statement, ie,

 

I went from this

 

sprintf(filename,"VGRUNRESULT_%d.txt",lineNumber);

fp = fopen(filename, "w");

 

 

to this

 

sprintf(filename,"C:\\Program Files\\VoiceGuide\\Scripts\\Intertrakvr\\VGRUNRESULT_%d.txt",lineNumber);

 

fp = fopen(filename, "w");

 

 

This is cumbersome. Any way to avoid it?

 

thanks,

Share this post


Link to post

This is really a VBScript question more then a VoiceGuide one...

 

Specifying the full path is the best way. If you do not specify the path then the 'current' path is used - but it's up to Windows to decide what is the current path - and as you can see Windows does not set this to always be what you'd expect...

 

You may be able to find out from what directory script is run using some of the Wsh object commands...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×