Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adir on steroids?
Message
De
18/09/2002 10:47:43
 
 
À
18/09/2002 10:03:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00701490
Message ID:
00701816
Vues:
16
Folks..

The deal will be something as:
clear
set console off
set print on
set printer to "c:\temp\tst.txt"

l_nfiles = adir(lafiles,"c:\*.*","D")
set escape on
for i = 1 to l_nfiles
    if  ("D"$lafiles[i,5])
        ? lafiles[i,1], "-------------------------"    && filename
        ?? ", ", lafiles[i,5]                          && attributes]
        l_nfiles2 = adir(lafiles2,lafiles[i,1])

        for ix = 1 to l_nfiles2
            if "D"$lafiles2[ix,5]
                if !(lafiles2[ix,1]==".") and !(lafiles2[ix,1]=="..")
                    *--Add(index, key, text, icon, smallIcon)
                    ? upper(lafiles2[ix,1])
                endif
            endif
        endfor
    else
        ? lafiles[i,1],                                && filename
        ?? ", ", allt(str(lafiles[i,2]))                     && file size
        ?? ", ", dtoc(lafiles[i,3])+" "+lafiles[i,4]   && file date & time
        ?? ", ", lafiles[i,5]                          && attributes]
        l_nfiles2 = adir(lafiles2,lafiles[i,1])
    endif
endfor
set console on
set print off
set printer to
There is some "bug" in this code. Because, the far deep that it can reach is 2 levels of subsubdirs.. But, works.. :-)

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform