简体   繁体   中英

How to delete a file in UFT?

I am access files in a folder through a for loop lie this

For Each f in re.files
    If .... Then
        --Here I want to delete the file f

How do I delete that file f? I dont need to do it inside the loop, I can refer to it outside and delete

Given a file object (via .GetFile or loop over .Files), use its .Delete method. If you have a path (string), consider to use the .DeleteFile method of the FileSystemObject.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM