Forum Discussion
JHunt
Community Hero
// String contents = ... new File("myfolder").mkdirs() new File("myfolder/mydoc.xml").text = contents
zellahee
5 years agoNew Contributor
My codes and it works:
def path = new com.eviware.soapui.support.GroovyUtils( context) // Getting relative path
def bkpath = (path.projectPath + "\\yourFolder\\")
//log.info(bkpath)
def folderName = ("XXXX" + variable)
def RMDir = new File("$bkpath/$folderName") // Path of folder to create
//log.info(RMDir)
RMDir.mkdir()
//Writing external file
def xxxx = context.expand('${Export_xxxxx#Response}')
new File("${RMDir}/" + "xxxx.xml").write( xxxx )
Related Content
- 6 months agosohailalam2696
- 12 months agolalit_singh
- 3 years agokathir_43
Recent Discussions
- 6 hours agoruchisingh