How to get File Creation Date & Time with QTP - Codes

Share This Post -

Below is the QTP Code to get file creation Date and Time:

QTP Code

Set f1 = CreateObject("Scripting.FileSystemObject")
    Set f2 = f1.GetFile("D:\Generic Test Plan.doc")
    S = "File was Created on: "&f2.DateCreated
    Msgbox S