Re: how to get the file within time range?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Mike schrieb:
Ok how is it possible to get a file within the range from 9:00 and 9:30am for example. I dont see how with your script.

I am kinda new to vbscript.

Mike
[...]
Dim tmFrom : tmFrom = TimeSerial( 9, 0, 0 ) ' to emphasize how to change numbers
Dim tmTill : tmTill = TimeSerial( 9, 30, 0 )
...
If bInRange Then ' show interesting files only
WScript.Echo oFile.DateCreated, tmFile, CStr( bInRange ), vbTab, oFile.Name
End If

output:

30.03.2005 09:14:51 09:14:51 Wahr activ.mdb
22.03.2007 09:06:33 09:06:33 Wahr broeden01.xml
22.03.2007 09:16:07 09:16:07 Wahr broeden02.xml
16.03.2007 09:07:16 09:07:16 Wahr eric.xml
30.03.2005 09:14:51 09:14:51 Wahr forum.mdb
28.07.2005 09:00:28 09:00:28 Wahr info.txt
24.05.2007 09:26:51 09:26:51 Wahr ldi.xml
24.05.2007 09:27:25 09:27:25 Wahr ldi.xsl
31.10.2005 09:12:41 09:12:41 Wahr mglx.txt
22.08.2006 09:27:31 09:27:31 Wahr reg.dump
31.10.2005 09:12:41 09:12:41 Wahr tmpi.txt
14.03.2007 09:18:27 09:18:27 Wahr userinfo.txt
03.09.2005 09:05:17 09:05:17 Wahr wr_file1.rtf



.