I am using the ADIR function to read the names of all picture files in a
particular folder into an array. I then append the names in the array into
a table. One of the users has more than 15000 files in their folder and get
an error message when the program reaches the line of code containing the
ADIR function. Does any one know an alternative way of getting file names
into a table ?

I have tried using RUN DIR >> X.TXT, but any file names greater than 8
characters are truncated. This doesn't happen when I actually use the DIR
command in a DOS window.

Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file in a
format that can be imported into a dbf. Although I might have to work with
those if there is no other go.

Any ideas ?

TIA
Sujata

Re: Alternative to ADIR() functions by Matthew

Matthew
Mon Dec 05 22:50:12 CST 2005

You have to use sys(2000). Something like the following would work

lcDir = "c:\*.*"
lcFilename = SYS( 2000, lcDIR )
DO WHILE !EMPTY( lcFilename )
* lcFilename is current file, do stuff with it

* Get next filename, if lcFilename is empty after sys(2000) call then
there are no more files
lcfilename = SYS(2000, lcDIR , 1)
ENDFOR



"Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>I am using the ADIR function to read the names of all picture files in a
> particular folder into an array. I then append the names in the array
> into
> a table. One of the users has more than 15000 files in their folder and
> get
> an error message when the program reaches the line of code containing the
> ADIR function. Does any one know an alternative way of getting file names
> into a table ?
>
> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
> characters are truncated. This doesn't happen when I actually use the DIR
> command in a DOS window.
>
> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file in
> a
> format that can be imported into a dbf. Although I might have to work
> with
> those if there is no other go.
>
> Any ideas ?
>
> TIA
> Sujata
>
>



Re: Alternative to ADIR() functions by Roger

Roger
Mon Dec 05 23:05:51 CST 2005

Or get VFP 9.
:-)

"Matthew Reed" <matty don't send me any freaking spam at zootal dot com
remove the don't send me any freaking spam> wrote in message
news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
> You have to use sys(2000). Something like the following would work
>
> lcDir = "c:\*.*"
> lcFilename = SYS( 2000, lcDIR )
> DO WHILE !EMPTY( lcFilename )
> * lcFilename is current file, do stuff with it
>
> * Get next filename, if lcFilename is empty after sys(2000) call then
> there are no more files
> lcfilename = SYS(2000, lcDIR , 1)
> ENDFOR
>
>
>
> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>I am using the ADIR function to read the names of all picture files in a
>> particular folder into an array. I then append the names in the array
>> into
>> a table. One of the users has more than 15000 files in their folder and
>> get
>> an error message when the program reaches the line of code containing the
>> ADIR function. Does any one know an alternative way of getting file
>> names
>> into a table ?
>>
>> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
>> characters are truncated. This doesn't happen when I actually use the
>> DIR
>> command in a DOS window.
>>
>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file in
>> a
>> format that can be imported into a dbf. Although I might have to work
>> with
>> those if there is no other go.
>>
>> Any ideas ?
>>
>> TIA
>> Sujata
>>
>>
>
>



Re: Alternative to ADIR() functions by Matthew

Matthew
Mon Dec 05 23:12:43 CST 2005

Did they increase the limit? What is it in VFP9?

"Roger" <roger@fact.ind.sg> wrote in message
news:O72q8Ii%23FHA.3676@TK2MSFTNGP12.phx.gbl...
> Or get VFP 9.
> :-)
>
> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
> remove the don't send me any freaking spam> wrote in message
> news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
>> You have to use sys(2000). Something like the following would work
>>
>> lcDir = "c:\*.*"
>> lcFilename = SYS( 2000, lcDIR )
>> DO WHILE !EMPTY( lcFilename )
>> * lcFilename is current file, do stuff with it
>>
>> * Get next filename, if lcFilename is empty after sys(2000) call then
>> there are no more files
>> lcfilename = SYS(2000, lcDIR , 1)
>> ENDFOR
>>
>>
>>
>> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
>> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>>I am using the ADIR function to read the names of all picture files in a
>>> particular folder into an array. I then append the names in the array
>>> into
>>> a table. One of the users has more than 15000 files in their folder and
>>> get
>>> an error message when the program reaches the line of code containing
>>> the
>>> ADIR function. Does any one know an alternative way of getting file
>>> names
>>> into a table ?
>>>
>>> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
>>> characters are truncated. This doesn't happen when I actually use the
>>> DIR
>>> command in a DOS window.
>>>
>>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
>>> in a
>>> format that can be imported into a dbf. Although I might have to work
>>> with
>>> those if there is no other go.
>>>
>>> Any ideas ?
>>>
>>> TIA
>>> Sujata
>>>
>>>
>>
>>
>
>



Re: Alternative to ADIR() functions by Carsten

Carsten
Tue Dec 06 04:46:54 CST 2005

Matthew,

the motto in VFP9 was "no limits". Arrays are now limited by amount of
avaiable memory.

--
Cheers
Carsten
_______________________________

"Matthew Reed" <matty don't send me any freaking spam at zootal dot com
remove the don't send me any freaking spam> schrieb im Newsbeitrag
news:%2341tDNi%23FHA.3388@tk2msftngp13.phx.gbl...
> Did they increase the limit? What is it in VFP9?
>
> "Roger" <roger@fact.ind.sg> wrote in message
> news:O72q8Ii%23FHA.3676@TK2MSFTNGP12.phx.gbl...
>> Or get VFP 9.
>> :-)
>>
>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
>> remove the don't send me any freaking spam> wrote in message
>> news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
>>> You have to use sys(2000). Something like the following would work
>>>
>>> lcDir = "c:\*.*"
>>> lcFilename = SYS( 2000, lcDIR )
>>> DO WHILE !EMPTY( lcFilename )
>>> * lcFilename is current file, do stuff with it
>>>
>>> * Get next filename, if lcFilename is empty after sys(2000) call then
>>> there are no more files
>>> lcfilename = SYS(2000, lcDIR , 1)
>>> ENDFOR
>>>
>>>
>>>
>>> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
>>> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>>>I am using the ADIR function to read the names of all picture files in a
>>>> particular folder into an array. I then append the names in the array
>>>> into
>>>> a table. One of the users has more than 15000 files in their folder
>>>> and get
>>>> an error message when the program reaches the line of code containing
>>>> the
>>>> ADIR function. Does any one know an alternative way of getting file
>>>> names
>>>> into a table ?
>>>>
>>>> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
>>>> characters are truncated. This doesn't happen when I actually use the
>>>> DIR
>>>> command in a DOS window.
>>>>
>>>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
>>>> in a
>>>> format that can be imported into a dbf. Although I might have to work
>>>> with
>>>> those if there is no other go.
>>>>
>>>> Any ideas ?
>>>>
>>>> TIA
>>>> Sujata
>>>>
>>>>
>>>
>>>
>>
>>
>
>



RE: Alternative to ADIR() functions by MichelRoy

MichelRoy
Tue Dec 06 04:59:02 CST 2005

you could use the sys(2000) function or you can use the shell object

Create Cursor myTable (filepath M)
loShell = CREATEOBJECT("Shell.Application")
loDir = loShell.NameSpace("C:\Documents and Settings\All Users\Documents")
FOR Each loFile IN loDir.Items
IF NOT loFile.IsFolder
INSERT INTO mytable (filePath) VALUES (loFile.Path)
ENDIF
NEXT

"Sujata Kekare" wrote:

> I am using the ADIR function to read the names of all picture files in a
> particular folder into an array. I then append the names in the array into
> a table. One of the users has more than 15000 files in their folder and get
> an error message when the program reaches the line of code containing the
> ADIR function. Does any one know an alternative way of getting file names
> into a table ?
>
> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
> characters are truncated. This doesn't happen when I actually use the DIR
> command in a DOS window.
>
> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file in a
> format that can be imported into a dbf. Although I might have to work with
> those if there is no other go.
>
> Any ideas ?
>
> TIA
> Sujata
>
>
>

Re: Alternative to ADIR() functions by Matthew

Matthew
Tue Dec 06 10:36:17 CST 2005

It's not available memory that limits it, there appears to still be some
per-array limit. I suspect they use an algorithm that looks at available
memory and allocates certain amount and no more. Still, it's nice to see
they increased the limit. I can now make arrays ridiculously large.

No limits my arse....***2GB***cough***2GB***



"Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
news:eVGTdJl%23FHA.740@TK2MSFTNGP11.phx.gbl...
> Matthew,
>
> the motto in VFP9 was "no limits". Arrays are now limited by amount of
> avaiable memory.
>
> --
> Cheers
> Carsten
> _______________________________
>
> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
> remove the don't send me any freaking spam> schrieb im Newsbeitrag
> news:%2341tDNi%23FHA.3388@tk2msftngp13.phx.gbl...
>> Did they increase the limit? What is it in VFP9?
>>
>> "Roger" <roger@fact.ind.sg> wrote in message
>> news:O72q8Ii%23FHA.3676@TK2MSFTNGP12.phx.gbl...
>>> Or get VFP 9.
>>> :-)
>>>
>>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
>>> remove the don't send me any freaking spam> wrote in message
>>> news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
>>>> You have to use sys(2000). Something like the following would work
>>>>
>>>> lcDir = "c:\*.*"
>>>> lcFilename = SYS( 2000, lcDIR )
>>>> DO WHILE !EMPTY( lcFilename )
>>>> * lcFilename is current file, do stuff with it
>>>>
>>>> * Get next filename, if lcFilename is empty after sys(2000) call
>>>> then there are no more files
>>>> lcfilename = SYS(2000, lcDIR , 1)
>>>> ENDFOR
>>>>
>>>>
>>>>
>>>> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
>>>> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>>>>I am using the ADIR function to read the names of all picture files in
>>>>>a
>>>>> particular folder into an array. I then append the names in the array
>>>>> into
>>>>> a table. One of the users has more than 15000 files in their folder
>>>>> and get
>>>>> an error message when the program reaches the line of code containing
>>>>> the
>>>>> ADIR function. Does any one know an alternative way of getting file
>>>>> names
>>>>> into a table ?
>>>>>
>>>>> I have tried using RUN DIR >> X.TXT, but any file names greater than 8
>>>>> characters are truncated. This doesn't happen when I actually use the
>>>>> DIR
>>>>> command in a DOS window.
>>>>>
>>>>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
>>>>> in a
>>>>> format that can be imported into a dbf. Although I might have to work
>>>>> with
>>>>> those if there is no other go.
>>>>>
>>>>> Any ideas ?
>>>>>
>>>>> TIA
>>>>> Sujata
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Alternative to ADIR() functions by Carsten

Carsten
Wed Dec 07 00:21:31 CST 2005

Matthew,

thanks for pointing it out.
A closer look in the help under "Visual FoxPro System Capacities" describes
the 2 GB limit.

--
Cheers
Carsten
_______________________________

"Matthew L Reed" <nousenetspam at dead ice dot us> schrieb im Newsbeitrag
news:ek0LJVo%23FHA.4028@tk2msftngp13.phx.gbl...
> It's not available memory that limits it, there appears to still be some
> per-array limit. I suspect they use an algorithm that looks at available
> memory and allocates certain amount and no more. Still, it's nice to see
> they increased the limit. I can now make arrays ridiculously large.
>
> No limits my arse....***2GB***cough***2GB***
>
>
>
> "Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
> news:eVGTdJl%23FHA.740@TK2MSFTNGP11.phx.gbl...
>> Matthew,
>>
>> the motto in VFP9 was "no limits". Arrays are now limited by amount of
>> avaiable memory.
>>
>> --
>> Cheers
>> Carsten
>> _______________________________
>>
>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
>> remove the don't send me any freaking spam> schrieb im Newsbeitrag
>> news:%2341tDNi%23FHA.3388@tk2msftngp13.phx.gbl...
>>> Did they increase the limit? What is it in VFP9?
>>>
>>> "Roger" <roger@fact.ind.sg> wrote in message
>>> news:O72q8Ii%23FHA.3676@TK2MSFTNGP12.phx.gbl...
>>>> Or get VFP 9.
>>>> :-)
>>>>
>>>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
>>>> remove the don't send me any freaking spam> wrote in message
>>>> news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
>>>>> You have to use sys(2000). Something like the following would work
>>>>>
>>>>> lcDir = "c:\*.*"
>>>>> lcFilename = SYS( 2000, lcDIR )
>>>>> DO WHILE !EMPTY( lcFilename )
>>>>> * lcFilename is current file, do stuff with it
>>>>>
>>>>> * Get next filename, if lcFilename is empty after sys(2000) call
>>>>> then there are no more files
>>>>> lcfilename = SYS(2000, lcDIR , 1)
>>>>> ENDFOR
>>>>>
>>>>>
>>>>>
>>>>> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
>>>>> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>>>>>I am using the ADIR function to read the names of all picture files in
>>>>>>a
>>>>>> particular folder into an array. I then append the names in the
>>>>>> array into
>>>>>> a table. One of the users has more than 15000 files in their folder
>>>>>> and get
>>>>>> an error message when the program reaches the line of code containing
>>>>>> the
>>>>>> ADIR function. Does any one know an alternative way of getting file
>>>>>> names
>>>>>> into a table ?
>>>>>>
>>>>>> I have tried using RUN DIR >> X.TXT, but any file names greater than
>>>>>> 8
>>>>>> characters are truncated. This doesn't happen when I actually use
>>>>>> the DIR
>>>>>> command in a DOS window.
>>>>>>
>>>>>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a
>>>>>> file in a
>>>>>> format that can be imported into a dbf. Although I might have to
>>>>>> work with
>>>>>> those if there is no other go.
>>>>>>
>>>>>> Any ideas ?
>>>>>>
>>>>>> TIA
>>>>>> Sujata
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Alternative to ADIR() functions by Matthew

Matthew
Wed Dec 07 10:04:51 CST 2005

It does not describe it, it merely states that it exists. It exists in it's
current state (most likely) because Microsoft does not want to increase it.

"Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
news:eq2u3Zv%23FHA.828@TK2MSFTNGP10.phx.gbl...
> Matthew,
>
> thanks for pointing it out.
> A closer look in the help under "Visual FoxPro System Capacities"
> describes the 2 GB limit.
>
> --
> Cheers
> Carsten
> _______________________________
>
> "Matthew L Reed" <nousenetspam at dead ice dot us> schrieb im Newsbeitrag
> news:ek0LJVo%23FHA.4028@tk2msftngp13.phx.gbl...
>> It's not available memory that limits it, there appears to still be some
>> per-array limit. I suspect they use an algorithm that looks at available
>> memory and allocates certain amount and no more. Still, it's nice to see
>> they increased the limit. I can now make arrays ridiculously large.
>>
>> No limits my arse....***2GB***cough***2GB***
>>
>>
>>
>> "Carsten Bonde" <bonde AT real-inkasso DOT de> wrote in message
>> news:eVGTdJl%23FHA.740@TK2MSFTNGP11.phx.gbl...
>>> Matthew,
>>>
>>> the motto in VFP9 was "no limits". Arrays are now limited by amount of
>>> avaiable memory.
>>>
>>> --
>>> Cheers
>>> Carsten
>>> _______________________________
>>>
>>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot com
>>> remove the don't send me any freaking spam> schrieb im Newsbeitrag
>>> news:%2341tDNi%23FHA.3388@tk2msftngp13.phx.gbl...
>>>> Did they increase the limit? What is it in VFP9?
>>>>
>>>> "Roger" <roger@fact.ind.sg> wrote in message
>>>> news:O72q8Ii%23FHA.3676@TK2MSFTNGP12.phx.gbl...
>>>>> Or get VFP 9.
>>>>> :-)
>>>>>
>>>>> "Matthew Reed" <matty don't send me any freaking spam at zootal dot
>>>>> com remove the don't send me any freaking spam> wrote in message
>>>>> news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
>>>>>> You have to use sys(2000). Something like the following would work
>>>>>>
>>>>>> lcDir = "c:\*.*"
>>>>>> lcFilename = SYS( 2000, lcDIR )
>>>>>> DO WHILE !EMPTY( lcFilename )
>>>>>> * lcFilename is current file, do stuff with it
>>>>>>
>>>>>> * Get next filename, if lcFilename is empty after sys(2000) call
>>>>>> then there are no more files
>>>>>> lcfilename = SYS(2000, lcDIR , 1)
>>>>>> ENDFOR
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
>>>>>> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
>>>>>>>I am using the ADIR function to read the names of all picture files
>>>>>>>in a
>>>>>>> particular folder into an array. I then append the names in the
>>>>>>> array into
>>>>>>> a table. One of the users has more than 15000 files in their folder
>>>>>>> and get
>>>>>>> an error message when the program reaches the line of code
>>>>>>> containing the
>>>>>>> ADIR function. Does any one know an alternative way of getting file
>>>>>>> names
>>>>>>> into a table ?
>>>>>>>
>>>>>>> I have tried using RUN DIR >> X.TXT, but any file names greater than
>>>>>>> 8
>>>>>>> characters are truncated. This doesn't happen when I actually use
>>>>>>> the DIR
>>>>>>> command in a DOS window.
>>>>>>>
>>>>>>> Commands like DIRECTORY and DISPLAY FILES, don't seem to create a
>>>>>>> file in a
>>>>>>> format that can be imported into a dbf. Although I might have to
>>>>>>> work with
>>>>>>> those if there is no other go.
>>>>>>>
>>>>>>> Any ideas ?
>>>>>>>
>>>>>>> TIA
>>>>>>> Sujata
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Alternative to ADIR() functions by Sujata

Sujata
Wed Dec 07 18:32:42 CST 2005

That worked beautifully. Thank you very much for your help. : )

Sujata

"Matthew Reed" <matty don't send me any freaking spam at zootal dot com
remove the don't send me any freaking spam> wrote in message
news:%233KsfAi%23FHA.2176@TK2MSFTNGP09.phx.gbl...
> You have to use sys(2000). Something like the following would work
>
> lcDir = "c:\*.*"
> lcFilename = SYS( 2000, lcDIR )
> DO WHILE !EMPTY( lcFilename )
> * lcFilename is current file, do stuff with it
>
> * Get next filename, if lcFilename is empty after sys(2000) call then
> there are no more files
> lcfilename = SYS(2000, lcDIR , 1)
> ENDFOR
>
>
>
> "Sujata Kekare" <sujataknospam@bigpond.com> wrote in message
> news:OEcNTxh%23FHA.3388@tk2msftngp13.phx.gbl...
> >I am using the ADIR function to read the names of all picture files in a
> > particular folder into an array. I then append the names in the array
> > into
> > a table. One of the users has more than 15000 files in their folder and
> > get
> > an error message when the program reaches the line of code containing
the
> > ADIR function. Does any one know an alternative way of getting file
names
> > into a table ?
> >
> > I have tried using RUN DIR >> X.TXT, but any file names greater than 8
> > characters are truncated. This doesn't happen when I actually use the
DIR
> > command in a DOS window.
> >
> > Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
in
> > a
> > format that can be imported into a dbf. Although I might have to work
> > with
> > those if there is no other go.
> >
> > Any ideas ?
> >
> > TIA
> > Sujata
> >
> >
>
>



Re: Alternative to ADIR() functions by Sujata

Sujata
Wed Dec 07 18:39:09 CST 2005

The sys(2000) function helped. Thank you for your help. I shall add this
to my bag of tricks. Would you be able to tell me where I can find a list
of all the methods in the shell object ?

Many thanks.
Sujata

"Michel Roy" <MichelRoy@discussions.microsoft.com> wrote in message
news:1EF4DCE1-E30C-48AA-9E52-260E46B62FD7@microsoft.com...
> you could use the sys(2000) function or you can use the shell object
>
> Create Cursor myTable (filepath M)
> loShell = CREATEOBJECT("Shell.Application")
> loDir = loShell.NameSpace("C:\Documents and Settings\All Users\Documents")
> FOR Each loFile IN loDir.Items
> IF NOT loFile.IsFolder
> INSERT INTO mytable (filePath) VALUES (loFile.Path)
> ENDIF
> NEXT
>
> "Sujata Kekare" wrote:
>
> > I am using the ADIR function to read the names of all picture files in a
> > particular folder into an array. I then append the names in the array
into
> > a table. One of the users has more than 15000 files in their folder and
get
> > an error message when the program reaches the line of code containing
the
> > ADIR function. Does any one know an alternative way of getting file
names
> > into a table ?
> >
> > I have tried using RUN DIR >> X.TXT, but any file names greater than 8
> > characters are truncated. This doesn't happen when I actually use the
DIR
> > command in a DOS window.
> >
> > Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
in a
> > format that can be imported into a dbf. Although I might have to work
with
> > those if there is no other go.
> >
> > Any ideas ?
> >
> > TIA
> > Sujata
> >
> >
> >



Re: Alternative to ADIR() functions by MichelRoy

MichelRoy
Wed Dec 07 19:03:02 CST 2005

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/shell/application.asp

watch the menu on the left side.

"Sujata Kekare" wrote:

> The sys(2000) function helped. Thank you for your help. I shall add this
> to my bag of tricks. Would you be able to tell me where I can find a list
> of all the methods in the shell object ?
>
> Many thanks.
> Sujata
>
> "Michel Roy" <MichelRoy@discussions.microsoft.com> wrote in message
> news:1EF4DCE1-E30C-48AA-9E52-260E46B62FD7@microsoft.com...
> > you could use the sys(2000) function or you can use the shell object
> >
> > Create Cursor myTable (filepath M)
> > loShell = CREATEOBJECT("Shell.Application")
> > loDir = loShell.NameSpace("C:\Documents and Settings\All Users\Documents")
> > FOR Each loFile IN loDir.Items
> > IF NOT loFile.IsFolder
> > INSERT INTO mytable (filePath) VALUES (loFile.Path)
> > ENDIF
> > NEXT
> >
> > "Sujata Kekare" wrote:
> >
> > > I am using the ADIR function to read the names of all picture files in a
> > > particular folder into an array. I then append the names in the array
> into
> > > a table. One of the users has more than 15000 files in their folder and
> get
> > > an error message when the program reaches the line of code containing
> the
> > > ADIR function. Does any one know an alternative way of getting file
> names
> > > into a table ?
> > >
> > > I have tried using RUN DIR >> X.TXT, but any file names greater than 8
> > > characters are truncated. This doesn't happen when I actually use the
> DIR
> > > command in a DOS window.
> > >
> > > Commands like DIRECTORY and DISPLAY FILES, don't seem to create a file
> in a
> > > format that can be imported into a dbf. Although I might have to work
> with
> > > those if there is no other go.
> > >
> > > Any ideas ?
> > >
> > > TIA
> > > Sujata
> > >
> > >
> > >
>
>
>