View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Scan directory and import file conditionaly

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.

"Michael.Tarnowski" wrote:

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/micro...+list ing%22#

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