hi there Greg,
is the delete method from code really working?
I've been trying to do it but always fails.
I've posted in
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=38&SearchTerms=DeleteFile as well.
Basically, I tried deleting one of the xml infopath forms on sharepoint, but 'FileExists' method cant seems to be able to locate the file.
This is the code snippet I used:
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
XDocument.UI.Alert("about to delete " + filespec);
if ( fso.FileExists(filespec) ) {
XDocument.UI.Alert("file found");
fso.DeleteFile(filespec);
XDocument.UI.Alert("file deleted");
}
where 'filespec' is the file location string to be deleted like 'http://sharepointlocation.com/Forms/libraryfolder/filename.xml'.
And my form template is fully trusted.
Any idea Greg? :)