if pos('AUTUP=Automatic',GetVar('AACD.prefs',Global,Binary)) = 0 then do
if length(GetVar('AACDIndex')||GetVar('AminetCDIndex')||GetVar('AminetSetIndex')||GetVar('AminetIndex')) = 0 then exit
'RequestChoice >ENV:AAUpdateNow "Amiga Active CD" "Do you wish to update the CD index*Nfiles on your hard drive with the new*Nones from the CD?" "Yes|No"'
if GetVar('AAUpdateNow') = 0 then do
call ShowMsg('This requester should not appear again.*NYou may update the index files at any time*Nfrom the Search section of AACDprefs')
call delete('ENV:AAUpdateNow')
exit
end
call delete('ENV:AAUpdateNow')
end
;;;
/* ;;; Update Index files */
/* AACD indices */
DestDir = GetVar('AACDIndex')
SrcDir = CDName':CDTools/Indices'
Pattern = ParsePattern('AACD??',NOCASE)
if DestDir > '' then call CopyFiles()
/* Aminet CD indices */
DestDir = GetVar('AminetCDIndex')
SrcDir = CDName':AACD/CDROM/AminetCDs/CDs'
Pattern = ParsePattern('Index??',NOCASE)
if DestDir > '' then call CopyFiles()
/* Aminet Set indices */
DestDir = GetVar('AminetSetIndex')
SrcDir = CDName':AACD/CDROM/AminetCDs/Sets'
Pattern = ParsePattern('Set?',NOCASE)
if DestDir > '' then call CopyFiles()
/* Aminet Online indices */
DestDir = GetVar('AminetIndex')
if DestDir > '' then do
SrcDir = CDName':AACD/Online/Aminet'
call DateCopy('INDEX')
call DateCopy('dirlist')
call open(List,AddPart(SrcDir,'dirlist'),'R')
do until eof(List)
File = readln(List)
if File = '' then iterate
call DateCopy(File)
end
call close(List)
end
;;;
/* ;;; Exit */
if Updated = 1 then call ShowMsg('All index files are up to date')
exit
;;;
/* ;;; Copy new files */
CopyFiles:
FileList = showdir(SrcDir)
do i = 1 to words(FileList)
if MatchPattern(Pattern,word(FileList,i),NOCASE,PARSED) then call DateCopy(word(FileList,i))
end
return
;;;
/* ;;; Copy updated files */
DateCopy:
parse arg FileName
say fileName '-' DestDir
if word(statef(AddPart(SrcDir,FileName)),5) > word(statef(AddPart(DestDir,FileName)),5) then do