Sunday, 27 April 2014

QTP - UFT - How to create a folder using VBScript

We can use "Scripting.FileSystemObject".

Syntax
strFolderpath = "C:\SampleFolder"
Set obj = Createobject("Scripting.FileSystemObject")
If obj.FolderExists(strFolderpath) = false Then
 obj.CreateFolder strFolderpath
End If
Set obj = nothing


Note:- To run the script copy and paste the script in Notepad and save it with extension ".vbs". Example "CreateFolder.vbs". Double click the file to run the script.
Or
Copy and paste the script in UFT / QTP and press F5 ( i.e. Run Button)
 

1 comment:

  1. There are obvious ways for real estate agents to market and then there are unobvious ways. Here is an article about ten unobvious ways to be creative, have fun with marketing, and demonstrate your uniqueness.ipucum

    ReplyDelete