Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Conrad Evans   on Nov 14 In MS Office Category.

  
Question Answered By: Lenora Green   on Nov 14

A simple Google search would have got you loads of information.

From what I can see, you can either use Application.FileSearch or simply Dir
() to list the files  in a directory. There were examples of using both to
search directories within the first few hits from the Google search.

The one you decide to use will be somewhat dependent on what you are doing.

If you are changing files in the same directory that you're listing, then
there is a chance that Dir () could get into trouble. On the other hand,
Application.FileSearch returns a collection of found files, and is less
likely to have this problem.

However, the problem can be avoided by the simple expedient of creating a
list of files first, then working through them.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Renaming all files in a folder Or get search suggestion and latest updates.


Tagged: