When I try to delete a file, I get the error "Multiple Errors: DoPhysicalFiles - - "
I believe the probable cause of this is because the physical file has been removed, header is still sat in the "File" TOC in admin.
How can I overcome this problem? I have 2000+ files to delete, but I do not know how to check if the physical file exists before trying to delete.
Many thanks,
Martin.
Hi Angela,
On the live server all the files are present and can be accessed, on the test server the vault was not copied across. This means I can only delete files that have been added to the test server.
I want to test a piece of code that deletes a file, but if the file is not present I get an an exception after the code has run. It appears that the File has an onBeforeDelete event that runs an internal method. This runs after the file meta-data has been deleted, ie try{} catch{} does not catch the exception.
Thus I want to be able to detect if the file is present before trying to delete it
I have read that I can use request - response to detect if a file exists at a URL, but I don't know how to get the URL to check. I have tried to copy the link, but the page always succeeds as this takes me to the ARAS Log-in page.
see msdn.microsoft.com/.../system.net.httpwebrequest.getresponse(v=vs.110).aspx
Hi Angela,
On the live server all the files are present and can be accessed, on the test server the vault was not copied across. This means I can only delete files that have been added to the test server.
I want to test a piece of code that deletes a file, but if the file is not present I get an an exception after the code has run. It appears that the File has an onBeforeDelete event that runs an internal method. This runs after the file meta-data has been deleted, ie try{} catch{} does not catch the exception.
Thus I want to be able to detect if the file is present before trying to delete it
I have read that I can use request - response to detect if a file exists at a URL, but I don't know how to get the URL to check. I have tried to copy the link, but the page always succeeds as this takes me to the ARAS Log-in page.
see msdn.microsoft.com/.../system.net.httpwebrequest.getresponse(v=vs.110).aspx