Advanced Mac OS question

Messages
3,699
Name
Pete
Edit My Images
Yes
I asked a question at the end of this thread but I wasn't very clear so I thought I would start a new thread to see if the new heading may draw an os x expert in (Darren were are you? ;))


I have two scripts slimtool.js and mootools.js in lots of different sub-directories and I want to automatically update them all with new versions of the script with the same name.

Is there any way to search through for a file name and replace multiple files with a new version?

Thanks.
:thumbs:
 
That begs the question why though. If you have multiple copies of these scripts why not put a single copy in the one place and when you write other scripts that use them point them to the one place?
 
That begs the question why though. If you have multiple copies of these scripts why not put a single copy in the one place and when you write other scripts that use them point them to the one place?


Good question!

I used some Lightroom Galleries that used the scripts and then exported lots of different galleries and uploaded them individually over time, it was all a nice simple automated process that generated the file structure which was pobably not ideal.

I guess maybe I could find out where in all the HTML the scripts are called and change the HTML to call the new version?

Is that easier than replacing the files?

:thinking:
 
It might be easier to do that now so that all new galleries you create use the new structure. If you carry on the old way then the problem will multiply as you'll have more and more galleries to update with newer versions.

Alternatively don't worry about it and just use newer versions in newer galleries and leave the old ones as is. Unless there is a security issue then I wonder whether you can get away with not updating the older ones?
 
It might be easier to do that now so that all new galleries you create use the new structure. If you carry on the old way then the problem will multiply as you'll have more and more galleries to update with newer versions.

Alternatively don't worry about it and just use newer versions in newer galleries and leave the old ones as is. Unless there is a security issue then I wonder whether you can get away with not updating the older ones?

I guess it's a shame if the older ones cannot be viewed in Chrome, it's the browser I'm using anyway! I use Dreamweaver and with that you can find and replace something in the source code of an entire site so have changed all instances of

resources/js/mootools.js

to

../js/mootools.js

and uploaded the new version of mootols to a js directory in the htdocs.

I have done the same thing with slimbox.js

It seems to have worked, I have dreamweaver "updating" the remote site, as I have about 2gb of files it is taking a while but I'm pretty confident it'll work

Thanks for your help and suggestions

:thumbs:
 
Back
Top