Scan directory and import file conditionaly

M

Michael.Tarnowski

Hi excel gurus,

I regulary scan certain directories to import (=append) new files -
depending on file type (*.doc) - in a worksheet. I'am looking for a
function which scans a directory and appends only these files which
are not in the worksheet where in row A the file name and in row B the
directory name should be stored.
In the group I found the thread
http://groups.google.com/group/micr...2807492d?hl=en&lnk=gst&q="directory+listing"#

Does anybody have an idea how to change the VBA function mentioned in
this posting?
Thanks in advance
Michael
 
J

joel

The code you posted takes a Root Folder and searches all the Folders below
the root folder. Your posting said you are searching certain directories. I
cn write a few different type macros depending on you real needs.

1) How many Foldes are you looking to search?
2) Do you want to also search the sub folders?
3) Where do you want the new files to be put? Below the present list or
someplace else in your workbook.

The code can be written so you can put the Folder names on a worksheet and
the macro will only look at your list of folders incluyding or not including
the subfolders. The code is simplier to write if you don't include the
subfolders. I have a macro that I can modifiy to do either.
 
M

Michael.Tarnowski

Hi excel gurus,

I regulary scan certain directories to import (=append) new files -
depending on file type (*.doc) - in a worksheet. I'am looking for a
function which scans a directory and appends only these files which
are not in the worksheet where in row A the file name and in row B the
directory name should be stored.
In the group I found the threadhttp://groups.google.com/group/microsoft.public.excel.worksheet.funct...

Does anybody have an idea how to change the VBA function mentioned in
this posting?
Thanks in advance
Michael

Nobody no idea????
Michael
 
J

joel

I've writtne code like what you want hundreds of timjes before. there arre
so many combinations of ways to do this that I need more information. That
is why I asked for the following information in my last posting

1) How many Foldes are you looking to search?
2) Do you want to also search the sub folders?
3) Where do you want the new files to be put? Below the present list or
someplace else in your workbook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top