k, if you look the CREATION time (changes as example when copying) this script will work with that.
the previous one is for MODIFICATION time checking.
$dir=@scriptdir+"\release\" ;dir where to check. remember ending slash
$scanningInterval=5 ;time in seconds to wait between scans
; $NewFile is always set to the new file.
; you can also directly code your execution to "lo" section
"stop script by pressing any key." ? "looking at:" ? $dir ?
$=0+dir($dir)
do $!=dir $1=FP($dir+$!) if $1>$ $=$1 $_=$! endif until ""=$!
"newist: " $_ " -> " $
$2=$
do
$=0+dir($dir)
do $!=dir $1=FP($dir+$!) if $1>$ $=$1 $_=$! endif until ""=$!
if $>$2
$2=$
$NewFile=$_
? "lo, THERE IS NEW FILE:" $_
endif
for $_=1 to $scanningInterval
sleep 1
if kbhit
? ? "you wanna exit?" ? "so be it."
sleep 3
exit 0
endif
next
until 1=0
;func: FP()
; code ripped from fnGetFileProp by Christopher Shilt (christopher.shilt@relizon.com)
Function FP($)
$FP = CreateObject("Scripting.FileSystemObject")
$FP = $FP.GetFile($).datecreated
EndFunction |
[ 08. October 2003, 09:44: Message edited by: Lonkero ]
_________________________
!download
KiXnet