My aim is to write code to cycle through all the documents in a particular directory. Each document requires text and bitmaps inserting and then moving to a new post-processing folder. Can anyone provide me with a solution using VB6 code.

I do not know how to access a list of all the files in the directory.

Any help would be much appreciated...

Recommended Answers

All 2 Replies

You can access all the files in a directory (you can get a directory list) like so:

' /* Naturally, Change This For Your Path and Files */
retval = dir("c:\windows\*.doc")
while retval <> "" 
     msgbox retval
     retval = dir
wend

Granted, that will simply pop up an annoying msgbox for every .doc file in the folder, but, you get the idea....

Thank you that will a good start.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.