rob_v2 Posted November 27, 2007 Share Posted November 27, 2007 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 More sharing options...
buddbrother Posted November 27, 2007 Share Posted November 27, 2007 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 More sharing options...
rob_v2 Posted November 28, 2007 Author Share Posted November 28, 2007 Exactly what I was looking for - the %date% will work perfectly. One last thing - where can I find a list of "global" vars that IVM knows? Ie - %date%, %time% etc.... Thanks Link to comment Share on other sites More sharing options...
Guest nchto Posted November 28, 2007 Share Posted November 28, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now