Jump to content

Savedata plugin - specify a unique filename for each call?


rob_v2

Recommended Posts

Hello all,

 

Im using the savedata plugin and was wondering if there is any way to do a few things w/ the file name.

 

For 1 application Id like to have each call be logged in a separate file. Is there anyway to do this?

 

For another application Id like to have a new file be created for each day.

Im looking for something like being able to name the file name - data.DD.MM.YYYY.csv

Is there anyway to automagically format the filename?

 

Thanks

-Rob

Link to comment
Share on other sites

This may answer both of your questions.

 

When you run the savedata plugin, if you save to a txt file that does not exist, it will create it.

 

Therefore if you want to have a unique log for each call, you simply have to write to a nonexistent file that will have a name unique to any other.

 

So for a unique call, you may want to do

 

savedata.exe C:\...\%cid%%date%%time%.txt arg1 arg2 arg3 ... argx

 

This would save the file with the caller id, the date, and the time in the name. WARNING: I should note that using the time won't work because the colon ":" is in it and it can't be used in file names on Windows. I wrote a plugin to covert the time from the hh:mm:ss format to hhmm or hhmmss format. Let me know if you're interested. Or you can use any other set of variables that will create an absolutely unique name each and every time. This is easy if the caller has a username or other unique identifier.

 

As for the log per day, you could do a similar setup. Simply call the savedata plugin and have the %date% in the file name. It will append to the same file until the next day where it will create a new file because a file name with that date doesn't exist yet.

 

Hope this helps!

Link to comment
Share on other sites

According to the help documentation included with the program:

The variables %time%, %date%, %cid%, %callername%, %linenumber%, %linename%, %did%, %drn% and %callsequenceno% are set automatically by IVM.
Link to comment
Share on other sites

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
×
×
  • Create New...