Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
15 years ago

Deleting project level properties via load script

Hello,
My projects have a bunch of properties which are created at project load script.

I want to clean up the project properties during project load.

Can I get some help with some groovy code that will delete all the existing project properties (name and values) .

Thanks

Ali

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Ali,

    sure.. try

    for( n in project.propertyName )
      project.removeProperty( n )

    Does that work ok?

    regards!

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    Little typo.

    for( n in project.propertyNames )

    works now.

    Ali