cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
383
Views
0
Helpful
4
Replies

File manipulation in ASP (JavaScript)

redstone_user
Level 1
Level 1

I need to do some file renaming. I am using the File System Object, utilising the Getfile and Movefile methods to perform the operations. Can CCM and 7970 phone handle those methods, because I continouslly get XML Error [4]: Parse Error?

Thanks.

4 Replies 4

stephan.steiner
Spotlight
Spotlight

Umm.. what exactly are you trying to do?

Keep in mind that the phones just understand the Cisco XML syntax - which means no client side javascript, no html, and the phones most definitely don't have a filesystem that you can access.

I'm using the 'pngviewer' example from the SDK as part of CCM. The example already uses the File System Object reference. However I would like to extend on this by using a few more methods, namely Getfile() and Movefile(). I need to rename a file extension from .png to .png.loc, this must be done on a systematic basis. Since the example uses the FSO, I would have assumed it could use the Getfile and Movefile() methods to allow renaming of the files. I would assume the Javascript is parsed by the CCM/Webserver and the 7970 looks at the XML. Hope this makes it a bit more clear without going into too much detail.

Thanks.

I tend to think that there's no such thing as too much detail.. It may have been clear to you from the getgo that we're dealing with a server side script - the problem is not everybody realizes that and we've seen people in the past asking about running javascript on the phone. Had you mentioned what you did in your second post from the getgo, there wouldn't have been any ambiguity - plus it also gives us a better idea about what you already know - being able to gauge the knowledge of the person who's asking the question is also quite important when attempting a reply.

Now that it's clear what you want to do, how do you get from server side javascript to the phone? Why not call your service from a webbrowser to see what you get, then compare the results with the schema of the XML language to see if something is off? Because your error means the XML is malformed (or you've found a bug in the phone load).

Stephan

Thanks for your help. Got to the bottom of the problem. It was permission rights on the CCM box that would not allow me to write a change to the .png file. Sorry for the inconvenience.

Thanks.