Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dir command
Message
De
16/12/2003 08:30:59
 
 
À
16/12/2003 08:02:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00859428
Message ID:
00859434
Vues:
17
>
>I am trying to use Dir to put a list of all files in my directory into one text file.
>Dir *.* to file test.txt
>But fox always shows me the list of these files in my window even when I am using a form and not using window command.
>
>How can I hide this list in my windows?
>I already tried to use SET CONSOLE and PROMPT.
>
Hi Romulo

This follow procedure will give you what you need:
myfile      = "c:\directory.txt"

m.handle    = FCREATE(myfile)
If  m.handle < 0 && I couldn´t create the file
    Wait window "File: "+myfile+" could not be created. Press any key !!"
    Return
Endif

gnflsnumber = ADIR(gafiles, '*.*')  && Create array

FOR nCount = 1 TO gnflsnumber  && Loop to N files 
   * Names of each file
  =fputs(m.handle, gafiles(nCount,1))
ENDFOR
=fclose(m.handle)
HTH

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