VoiceGuide IVR Software Main Page
Jump to content

Renaming Files

Recommended Posts

Hi,

 

we make loop and want to join recorded calls. to make this we need to rename recorded wav file.

how to make this in VBscript?

 

 

as vbs file working

 

set vg = CreateObject("Scripting.FileSystemObject")
vg.MoveFile "C:\callrecord\123.wav" , "C:\callrecord\123_1.wav"
set vg = Nothing

but not in VG.

 

084925.959 169 7 3 ERROR RunScript_ClearScript_ScriptEngineException
ERROR ErrorDetails: bad name or file number
ERROR Message: bad name or file number
ERROR Source: ClearScript
ERROR StackTrace: at Microsoft.ClearScript.ScriptEngine.ThrowScriptError(IScriptEngineException scriptError)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ThrowScriptError(Exception exception)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.<>c__DisplayClass1e`1.<ScriptInvoke>b__1d()
at Microsoft.ClearScript.ScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.ScriptInvoke[T](Func`1 func)
at Microsoft.ClearScript.Windows.WindowsScriptEngine.Execute(String documentName, String code, Boolean evaluate, Boolean discard)
at (Object , String )
at ..(Object oParam)

 

 

 

Share this post


Link to post

The error reported by ClearScript (and probably coming originally from Scripting.FileSystemObject)is:

ERROR ErrorDetails: bad name or file number

so sounds like ClearScript/Scripting.FileSystemObject is not able to find the file C:\callrecord\123.wav, or maybe not able to gain full access to it to rename it...

 

Googling:

 

FileSystemObjectbad name or file number

 

or

 

FileSystemObject MoveFile bad name or file number

 

may show some hits that may discuss possible causes for such a response.

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
×