. - 2


@j,0 SAY SPACE(80) COLOR "n/n"

NEXT

********** TXT-, 0

FILEDELETE("0*.TXT")

*****

Count = ADIR("*.TXT") && - TXT-

IF Count = 0

Mess = " TXT- !!!"

@15,40-LEN(Mess)/2 SAY Mess COLOR "gr+/n"

INKEY(0)

RESTSCREEN(0,0,24,79,scr_start)

SHOWTIME()

QUIT

ENDIF

PRIVATE Name[Count],Size[Count] &&

Count = ADIR("*.txt",Name,Size)

SortData(Name,Size,LEN(Name),1) &&

CrLf = CHR(13)+CHR(10) && () (CrLf)

*** TXT-

Num_pp = 0 &&

FOR f = 1 TO Count && TXT-

******

Buffer = FILESTR(Name[f],.T.)

Buffer = CHARONE(" ",Buffer) &&

Buffer = Buffer + CrLf

Len = AT(CrLf,Buffer)

DO WHILE Len > 0 .AND. LASTKEY() <> 27 &&

Len = AT(CrLf,Buffer)

IF Len > 0

******

Str_pr = ALLTRIM(SUBSTR(Buffer,1,Len-1))

Fn_out = STRTRAN(STR(++Num_pp,4)," ","0")+SUBSTR(Name[f],1,4)+".TXT"

STRFILE(Str_pr,Fn_out)

******

Buffer = ALLTRIM(SUBSTR(Buffer,Len+1))

ENDIF

ENDDO

NEXT

*** TXT-

FOR f=1 TO Count

FILEDELETE(Name[f])

NEXT

RESTSCREEN(0,0,24,79,scr_start)

SHOWTIME()

QUIT

153.

154 , TXT-, .