Deleting a folder

  • Hey,

    In the reporting services script file that I run to install my reporting service, I want to delete any previous installation (i.e, if such a folder exists). So I added the line "rs.deleteItem(path)", which works fine if there IS a previous installation, but if there ISN'T a previous installtion, i get an Item not found exception (obviously).

    So how can I verify that a previous installation folder exists BEFORE I attampt to delete it???

  • Easy way out -> put a try-catch around the call, and just drop (ignore) the exception.

    A little more work-> use the FindItems method and then check the CatalogItems collection returned to see if your item is in it.

     

     

    Steve.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply