Automation testing QTP with VB Script functions Interview questions


Total available count: 68
Subject - Software Testing
Subsubject - Automation testing QTP with VB Script functions

Method: DeleteFile?

It deletes a specified file.

Syntax: fso.DeleteFile (filename[, force])

Arguments:
fso: (Required) The name of a FileSystemObject object previously instantiated.
filename: (Required) The name of the file to delete. The filename can contain wildcard characters in the last path component.
force: (Optional) Boolean value that is True of files with the read-only attribute set are to be deleted;False if they are not. False is the default.

Example:   

Set fso=createobject("Scripting.FileSystemObject")
'File to be  deleted.  Sourcefile="C:copy.txt"  'Delete the file
fso.DeleteFile Sourcefile
Set fso=nothing

 




Next 5 interview question(s)

1
Method: CreateFolder?
2
Method: CopyFolder?
3
Method: MoveFolder?
4
Method: DeleteFolder?
5
Method: DriveExists?

Comments