CLS OPEN "GI.Dat" FOR INPUT AS #1 DO UNTIL EOF(1) LINE INPUT #1, rec$ 'PRINT rec$ 'rec$ = "06/20/97 08:20a 45,254 5005.bgif" '10/07/96 10:47a 20,460 6098.gif '04/02/97 07:34p 2,791 6098.sGIF '06/20/97 08:19a 45,999 6099.bgif ' 'return right most 15 chars ' rec$ = RTRIM$(rec$) rec$ = LTRIM$(rec$) trec$ = RIGHT$(rec$, 15) 'PRINT trec$ ' ' find file name in the lefy most 15 chars of directory listing ' sp% = INSTR(1, trec$, " ") 'find space position lp% = LEN(trec$) 'PRINT sp% oldfileN$ = RIGHT$(trec$, lp% - sp%) 'get file name right of space between size & file name oldfileN$ = LTRIM$(oldfileN$) oldfileN$ = RTRIM$(oldfileN$) ' ' Find file name suffix & prefix ' ds% = INSTR(1, oldfileN$, ".") PRINT ds% IF ds% > 0 THEN fsuffixO$ = RIGHT$(oldfileN$, ds% - 1) PRINT fsuffixO$ IF ds% > 0 THEN fprefixO$ = LEFT$(oldfileN$, ds% - 1) PRINT fprefixO$ fprefixO$ = RTRIM$(fprefixO$) oldfileN$ = fprefixO$ + "~1 ." + fsuffixO$ PRINT fsuffixO$ 'INPUT o$ ' ' change bigs ' IF fsuffixO$ = "bgif" THEN fsuffixN$ = "gif" fprefixN$ = fprefixO$ + "b" 'PRINT fprefixN$ + "." + fsuffixN$ newfileN$ = fprefixN$ + "." + fsuffixN$ PRINT "Old File Name =" + oldfileN$, " New File Name = "; newfileN$ 'INPUT o$ PRINT "gi\" + newfileN$ newfileN$ = LTRIM$(newfileN$) newfileN$ = RTRIM$(newfileN$) PRINT oldfileN$ INPUT o$ NAME "C:\eAtlas\Images\GI\" + oldfileN$ AS "C:\eAtlas\images\gi\" + newfileN$ END IF ' ' Change smalls ' IF fsuffixO$ = "sGIF" THEN PRINT "At Smalls" 'INPUT o$ fsuffixN$ = "gif" fprefixN$ = fprefixO$ + "s" newfileN$ = fprefixN$ + "." + fsuffixN$ PRINT "Old File Name =" + oldfileN$, " New File Name = "; newfileN$ 'INPUT o$ newfileN$ = LTRIM$(newfileN$) newfileN$ = RTRIM$(newfileN$) NAME "C:\eAtlas\Images\GI\" + oldfileN$ AS "C:\eAtlas\images\gi\" + newfileN$ END IF LOOP END