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
4 Comments »
Leave a comment
-
Archives
- July 2011 (1)
- March 2011 (1)
- November 2010 (1)
- November 2008 (4)
- October 2008 (2)
- September 2008 (2)
- June 2008 (1)
- March 2008 (4)
- February 2008 (44)
-
Categories
- Automated Test Script Creation Process
- Automating MS Word
- Automating QC
- Automation Object Model For QTP
- Backward compatability in QTP
- Browser Scripts
- COM and QTP
- compare 2 text files
- Descriptive programming
- Descriptive Programming and Child Objetcs
- Dictonary Object
- DotNetFactory
- Excel Automation
- Extra Topics
- Files and Folders
- General Standards to be followed in Test scripts
- New Features In QTP9.5
- QC-OTA
- QTP Additional Faqs
- QTP Faqs
- QTP Naming Convention
- QTP Tips and Faqs
- Running stored procedures from QTP
- Send keyboard keys
- Uncategorized
- Uninstall a software using QTP
- Uninstall a software using vbscript
- Update data in a database
- VBScript and IE Automation
- VBScript Faqs and Useful resources
- What’s New in Quick Test Pro 9.0
- Whats New in QTP 9.5
- XML Scripting
-
RSS
Entries RSS
Comments RSS
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 |
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 |
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 |
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 |