Scanning subdirectories for files

  • Thread starter Thread starter john
  • Start date Start date
J

john

I have made a program that extracts properties form CAD
files.

Now I want to give a directory as input and then have the
program scan through all files in all subdirectories.

Is there an example somewhere?

And would it then have to be recursive - in order to work
its way through many levels of subdirectories?

John
 
Hello Juan

I'll check out the API-example - thank you.

My Spanish is limited to what I heard from the guys
selling refreshments on the beach in Barcelona many years
ago: "Cervezas, Patatas, Pe'si Cola..."

Saludos Amigos

John
 
Juan,
Amazing... it works!

....one question though:
SysCmd acSysCmdSetStatus, ruta & nomarchivo

does not to display anything... I put in a msgbox just to
see it work. I dont know this command but the in help it
looks like some kind of Progress Bar (which I would like
to know how to use in general). Do I have to make an
initial command to display it?

John
 
Translation:

SysCmd acSysCmdSetStatus, ruta & nomarchivo

is

SysCmd acSysCmdSetStatus, path & filename

This would display the path and file name which is in that moment being
read, in the Access status bar. It could be that you don't see anything
because the code is going really fast, and you need to try with a big
directory (as "c:\MyDocuments" or even "C:\"). It depends on your patience
;-)

SysCmd could do many other things for you, depending upon the constant that
follows the method. Ie:

SysCmd acSysCmdInitMeter "Some status bar text", 100

will initialize the Access progress bar with the text "Some status bar text"
and indicating the maximum length of 100. Then

SysCmd acSysCmdUpdateMeter, number

will update the Access progress bar to the number indicated in varible
number (a value between 1 to 100, which is the maximum length). If you make
a loop like

dim i as integer

SysCmd acSysCmdInitMeter "Some status bar text", 100

for i= 1 to 100
' do some actions and then
' increment the progress bar in 1
SysCmd acSysCmdUpdateMeter, i
next

' Clear status bar to the original text
SysCmd acSysCmdClearStatus

Anyway again, I have a very simple example of Access progress bar in

http://www.clikear.com/webs4/juanmafan/trucos/progresando.htm

HTH

--
Saludos desde Barcelona
Juan M. Afan de Ribera
<MVP Ms Access>
http://www.juanmafan.tk
http://www.clikear.com/webs4/juanmafan


"john" <[email protected]> escribió en el mensaje
Juan,
Amazing... it works!

....one question though:
SysCmd acSysCmdSetStatus, ruta & nomarchivo

does not to display anything... I put in a msgbox just to
see it work. I dont know this command but the in help it
looks like some kind of Progress Bar (which I would like
to know how to use in general). Do I have to make an
initial command to display it?

John
 
I just had a very small diretory tree - and it all
happened in a split second. With c:\my documents it has
enough to do to actually make something appear in the bar.

Thanks for the info on the progress meter - I'll check out
your example.

Your answers have really helped me!

John
 
Back
Top