he didn't tell. just kept his topic on top.
this assumes that file is to be placed in:
basedir\company\reporttype\plant\date and time.html
code:
;creates folders for company, report type and plant codes if not exist
;main dir for reports:
$basedir="c:\"
;place where all read from:
$reportsdir = "%temp%\"
$file=dir($reportsdir+"*.html")
while not @error
$company=left($file,4)+"\"
if not exist($basedir+$company) md $basedir+$company endif
$type=substr($file,5,3)+"\"
if not exist($basedir+$company+$type) md $basedir+$company+$type endif
$plant=right($file,3)+"\"
if not exist($basedir+$company+$type+$plant) md $basedir+$company+$type+$plant endif
$time=GetFileTime($reportsdir+$file)
$time=right($time,4)+substr($time,6,2)+substr($time,9,2)+" "+substr($time,12,2)+"h"+substr($time,15,2)+"m"+right($time,2)+"s"
copy $reportsdir+$file $basedir+$company+$type+$plant+$time+".html"
del $reportsdir+$file
dir()
loop
[ 13 July 2002, 15:48: Message edited by: Lonkero ]