Logo QF-Test

Finding valuable answers
in the Mailing List Archive.

 

Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2016 up to now | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2007


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] Delete a file/folder from the filesystem using script


  • Subject: Re: [QF-Test] Delete a file/folder from the filesystem using script
  • From: Martin Moser <martin.moser@?.de>
  • Date: Thu, 18 Oct 2007 14:34:10 +0200

Hello Yossi,

you could also try a server-script node with following content:

import shutil
shutil.rmtree(rc.lookup("directory"))

Regards,
Martin


--On Donnerstag, Oktober 18, 2007 11:23:00 +0200 Yossi Loson
<yossi.l@?.com> wrote:

Hi Gregor,

Thanks for your answer, I do know about "Execute shell command" node,
however I am unable to delete a subdir with all its content (including
the dir itself)

For example in the Directory filed I set the full path to the parent dir
and under Client field I use "server"  While under shell command I use
every way I know to delete dir in dos  rd /q <subdir>
del /q <subdir>
deltree <subdir>
del or rd alone

The best result I got so far was removing the content of the subdir but
that's not enough as I do need to remove the entire subdir

Can you please help here?

Thanks
Yosi

-----Original Message-----
From: Gregor Schmid [mailto:Gregor.Schmid@?.de]
Sent: Wednesday, October 17, 2007 11:07 PM
To: qftest-list@?.de
Cc: Yossi Loson
Subject: Re: [QF-Test] Delete a file/folder from the filesystem using
script


Hi Yossi,

there are many ways. The most convenient probably are using an
"Execute shell command" node, or using a "Server script" node
employing Python's shutil package. See

http://www.python.org/doc/2.0.1/lib/module-shutil.html

for details about the latter.

Best regards,
    Greg

"Yossi Loson" <yossi.l@?.com> writes:

   Hello,


   Can anyone explain how do I delete a file/folder from the file system?

   I am working on WinXP and have the latest QFTest version (2.1.0 P3)


   Also

   I have several test suites I want to run in batch mode, is there a way
   to do this?




   Thanks



--
Martin Moser                           martin.moser@?.de
Quality First Software GmbH            http://www.qfs.de
Tulpenstr. 41                          Tel: +49 8171 919874
DE-82538 Geretsried                    Fax: +49 8171 919876
GF: Gregor Schmid, Karlheinz Kellerer  HRB München 14083



Videos Downloads Documentation Buy Free Trial