Question : Problem: Copy a updated file to multiple subfolders

Hi everyone

My company hosts some web software which we also wrote for lots of websites (400+ of them)

With the release of IE7 we've make a patch for our software that updates two menu related files ( /code/menu.js and another one)

We currently only patch as customers complain, which is a bit crap.

The IIS is stored like:

inetpub
-wwwroot
--site1
--site2
--site3
--site400
etc

and within each of the sites under a subdirectory 2 files need updating.

I've tried command line tools and literally 30 different 'file find and replace' type tools but can't find something that will find all the menu.js files and overwrite them with my updated one.

Nor have I found a copy command/tool that will copy to multiple subfolders e.g. treating the folder name as a wild card.

Can anyone help?

Answer : Problem: Copy a updated file to multiple subfolders

Oh B! ur right it doesn't do what you want...
So we'll have to create a batch file.
Run "dir /ad /b >test.bat"
That'll give you a list of all subdirs.
Open test.bat in a word processor and prefix each line with "xcopy old.txt " and suffix each line with " /u"
Save the file "plain text only"
Run test.bat
That will only put a copy of the new version of old.txt in directories where there is an existing file.
Apologies for the earlier red herring.
Regards,
Peter



Random Solutions  
 
programming4us programming4us