Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dir command
Message
From
16/12/2003 08:30:59
 
 
To
16/12/2003 08:02:01
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00859428
Message ID:
00859434
Views:
18
>
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform