The code below shows an example on how to do this. It's not the most efficient way to do this but it should get you started on some ideas. It requires the DirPlus UDF (see link below).
!!THIS IS NOT TESTED SO BE CAREFUL!!
Code:
;Call the Driplus UDF.
Call @SCRIPTDIR + "\DirPlus().udf"
;
;Enumerate all FILES on drive x:
;Change the drive to the you got in your setup.
$files = dirplus("x:\","/a-d")
;
;Split the date on the / character and the join the parts with no separation characters.
$date = Join(Split(@date, "/"),"")
;
;Get the filename without the drive letter so start counting at the 4th character.
$filename = SubStr ($file, 4)
;
;Get the extension of the file.
$ext = SubStr ($filename, Len($filename) - 4)
;
;Do the stuff inside the For each--next loop for each file found.
For Each $file in $files
;Split the time at the : character and then join the parts with no separation characters.
$time = Join(Split(@TIME, ":"),"")
;Copy the file and rename it during the copy process.
Copy $file "y:\somefolder\" + $date + "-" + $time + $ext
;Sleep 1 second to get the $time var different for each file.
Sleep 1
Next
DirPlus() - a recursive dir tool
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.