Re: Read path from text file to process directory structure

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

Before I jump in with both feet and offer a solution, can you answer a
couple of questions?
You write that you can make changes to a single directory, but that your
directory structure is nest with 2 levels of subdirectory.

Does that mean that your single directory has 2 SUBFOLDERS?
Or, did you mean what you wrote that you have a single Directory with 2
levels of subdirectory (i.e., Folders containing subfolders)?

Dave

"newschapmj1" <newschapmj1@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F14F5290-507B-4647-98A8-514E97AC5A35@xxxxxxxxxxxxxxxx
I need to process about 10K of Word templates and make a simple change
(changing the path in a mail merge document)
I can make the changes to a single directory at the moment.

The directory structure is nested with 2 levels of subdirectory.

One idea was to generate a text file containing the full path of each
document
and then use this to process all the files.
I've not been able to find examples on this yet.


An alternative was to find code that could cope with 2 levels of
subdirectory

I'm using Word 2002

I found the following but there is work involved to get it to work with
subdirectories to 2 levels
=====================

Dave Lett 2/17/2006 10:15 AM PST

Hi Jim,

Have a look at the article "How to get the names of all the folders in the
folder tree, starting from a specified folder" at
http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm.

You can probably nest your routine inside this one.
Then, to access each file in that folder, have a look at the article "How
to
read the filenames of all the files in a directory into an array" at
http://word.mvps.org/faqs/macrosvba/ReadFilesIntoArray.htm

HTH,
Dave




.



Relevant Pages

  • Re: ANN: XML EZ Out 1.03 posted
    ... > keep it together in a single directory and keep the String_Stream and ... I was thinking to put all in a mckae folder. ... Could you perhaps make the packages ... > documentation pointing back to www.mckae.com. ...
    (comp.lang.ada)
  • Re: File / Folder Limits
    ... > Does anyone know how many files can be in one folder? ... Everyone else has pointed out that under NTFS there is a huge number of ... files that you can put in a single directory. ... server with a very fast disk subsystem you ...
    (microsoft.public.win2000.setup)
  • Re: Alternatives to du
    ... folder, but don't really want to use du because of the beating my RAID ... require smacking around my hard drives to get the data and don't take ... If you have 10,000+ files in a single directory, file access slows significantly. ...
    (Fedora)
  • Re: extract files from many folders into a single folder in one go?
    ... Use it to copy all the files to a single directory ... xxcopy source destination /s /sx ... > I have hundreds of folders and within each folder there are files. ... > to highlight all the folders and extract the files in one go. ...
    (microsoft.public.windowsxp.help_and_support)