Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adir on steroids?
Message
From
18/09/2002 10:47:43
 
 
To
18/09/2002 10:03:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00701490
Message ID:
00701816
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform