I've some new files in a folder A. I want to replace the old files which are located in different folders (ex. B, C, D), with the new files. Is there any way to do this in one shot by writing some script in Mac OS?
For example, the new files are located in /Updatede
, and have names such as: flower1.jpg
, flower2.jpg
, flower3.jpg
.
Now I want to replace below old files
/Workarea/AssetGroupOne/flower1.jpg
/Workarea/AssetGroupTwo/flower2.jpg
/Workarea/AssetGroupThree/flower3.jpg
/Workarea/AssetGroupSix/flower1.jpg
I want to be specific like /Updated/flower1.jpg
should replace only the /Workarea/AssetGroupOne/flower1.jpg
not the /Workarea/AssetGroupSix/flower1.jpg
Note: I have more files, but for the sake of brevity, I have not listed them all here.
/
? Aren't they located in your users home folder? – nohillside Jan 04 '19 at 13:59/Updated/flower1.jpg
should replace only/Workarea/AssetGroupOne/flower1.jpg
and not/Workarea/AssetGroupSix/flower1.jpg
? Can you create a text file with the file name and the target for each file? – terdon Jan 07 '19 at 09:01