home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / tools / cd / indexcd / bin / sources.lha / sources / IndexFiles.c < prev    next >
C/C++ Source or Header  |  1997-02-15  |  779b  |  38 lines

  1. /* dcc HD1:IndexCD/Bin/IndexFiles.c */
  2.  
  3. char *Titolo = "$VER: IndexFiles v1.0 (15-02-1997) © by Claudio Buraglio";
  4.  
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <time.h>
  8.  
  9. char    line[255];
  10. char    work[255];
  11. char    ora [20];
  12.  
  13. unsigned char *ptr;
  14.  
  15. int main(int arglen, char **argptr)
  16. {
  17.     printf("\n%s\n\n",Titolo+6);
  18.  
  19.     if (access("T:AmigaGuide_Workbench",0) == 0)
  20.     {
  21.         remove("ENV:AmigaGuide/Workbench");
  22.         system("c:Copy T:AmigaGuide_Workbench ENV:AmigaGuide/Workbench");
  23.     }
  24.  
  25.    time_t t = time(NULL);
  26.    struct tm *tp = localtime(&t);
  27.    strftime(ora, sizeof(ora) - 1, "T:%H%M%S.guide",  tp);
  28.  
  29.     sprintf(line,"ICD:Bin/IndexAG >NIL: %s %s %s -D S\n",argptr[1],ora,argptr[2]);
  30.     system(line);
  31.  
  32.     sprintf(line, "SYS:Utilities/AmigaGuide >NIL: %s\n", ora);
  33.     system(line);
  34.  
  35.     remove(ora);
  36. }
  37.  
  38.