Quick test professional

QTP Tips QTP codes QTP Faqs and more

Get all files within a time range or specified time

Dim From

From = TimeSerial( 11, 0, 0 ) ‘ to emphasize 24 hour clock! 11 AM

Dim Till

Till = TimeSerial( 13, 0, 0 )

 Dim oFS

Set oFS = CreateObject( “Scripting.FileSystemObject” )

Dim oFile, tFile, Range

For Each oFile In oFS.getFolder( “.\” ).Files

tmFile = TimeValue( oFile.DateCreated )

bInRange = tFile >= From And tFile <= Till

msgbox oFile.DateCreated &”–“& oFile.Name
   Next

February 15, 2008 - Posted by | Files and Folders | , , , , , , , , , ,

4 Comments »

  1. I am not getting the output. This always run without any error. No message box display even I changed reverse value into From and Till.

    Comment by K Anshu | February 29, 2008 | Reply

  2. This code is tested one. it is working fine. The from and till variables are the time stamps to search beteen.
    This example was written for getting the files created between 11 am to 1 pm.
    so create a sample file now and modify the from and till variables

    or use now() and now()-1 in the variables From and Till

    Comment by quicktestprofessional | March 3, 2008 | Reply

  3. hi this is suman from hyderabad working in manual testing after seeing your website i wanna tell u some thing…….i have seen so mnay websites regarding QTP..
    1)Advancedqtp.com
    2)mercuryquicktestprofessional.blogspot.com
    3)Allinterview.com
    4)Qtp.blogspot.com
    you are having very sound knowledge in QTP Is it possible to talk to you over the phone or i wanna chat with u…By seein gyour lastname i realized you are from andhrapradesh….
    my number :9908803299
    email :sumannatakala@gmail.com
    your helping allot people those are searching job in QTP i will be waiting for reply……… send me your mail id and contact number i wanna talk to you…..

    Comment by sumankumar natakala | March 25, 2008 | Reply

  4. QTP Blog for Certification and Concepts

    Dear Friends,

    For real time concepts on quicktest professional, training , QTP scripts and Certification Material, you can visit quicktesthp.blogspot.com . The posts are updated regularly. If anyone would like to contribute, please feel free to contact me. Refer my blog for contact details..

    Blog Address
    quicktesthp.blogspot.com

    For basic tutorials on QTP, you can visit
    qtpgoodtutorials.blogspot.com

    ——————–
    Keywords: QTP, quicktest, hp, qtp certification, quicktest professional, qtp training, qtp help, checkpoint, data table

    Comment by ExpertQTP | July 15, 2008 | Reply


Leave a comment