Re: Best way of copying a single file to multiple directories?
Peter Szmulik <peter@szmulik.com> wrote:
> [...] I need a custom php.ini file in each
> directory that contaings php files. That might sound trivial but
> belive me there are a few (!). It also took a while to upload all the
> files in the first place...
> What would the best way of copying my new php.ini file to all
> directories in a directory tree be?
I'd suggest that maybe a good way forward would be to create a local
copy of the installation. You can then use a file transfer program that
understands recursive copying to transfer the entire directory tree in
"one" operation.
To install a file in each directory within a tree, I'd use a command
line utility. The unix-style "find" command could be used to do this
(there are versions of it for Windows platforms, too):
cd top-of-directory-tree
find * -type d -exec cp -p /path/to/source/php.ini {} \;
For a Windows platform you'd use "copy" in place of the "cp -p".
Chris
|