Re: Alternative to ADIR() functions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1EF4DCE1-E30C-48AA-9E52-260E46B62FD7@xxxxxxxxxxxxxxxx
> 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
> >
> >
> >


.



Relevant Pages

  • Alternative to ADIR() functions
    ... 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 ... command in a DOS window. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Alternative to ADIR() functions
    ... >> * lcFilename is current file, ... >>> particular folder into an array. ... >>> command in a DOS window. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: How to get the files names from the folder using PHP ..
    ... How to get the files names from the folder using PHP .. ... specific command. ... if {return array();} ...
    (alt.php)
  • RE: Locating corrupt driver
    ... This article describes the functionality and limitations of the Windows ... Create and format partitions on drives. ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.applications)
  • Re: Dim RetVal
    ... Looking in the folder there is a coed11.dat DAT file, the coed11 application, coed11.gdb GDB file ... The reason is that without the quotes, the command processor sees the ... In the command window, first type ... This *should* have exactly the same effect as the macro. ...
    (microsoft.public.word.vba.beginners)