Solved Bulk Replace Images
-
I have a thousands of folders, each with one image inside (along with other data).
I need to replace every image, with a new one (same image). The same image will be copy
What's the best way to script this?
The images files all have the same name, and extension.
-
Windows or Linux?
-
@dustinb3403 I can handle both, but hoping for Windows.
-
Hrm. . .
Do you want the original image overwritten or can the script go back and just drop the file into this directory?
Are the images the same in each directory or is it a unique image per directory?
-
-
https://stackoverflow.com/questions/3312310/replacing-a-file-into-multiple-folders-subdirectories
FOR /R C:\MyPath\ %%I IN (5.jpg) DO COPY /Y C:\NewImage\5.jpg %%~fI
OR
Replace C:\SomeFile.Txt C:\SomeRootFolder_ContainsMultipleSubFolders /s
-
@dustinb3403 the image need to be overwritten. The image is the same (name+ext) in every directory.
-
@aaronstuder take a look at link One than.
-
Replace C:\SomeFile.Txt C:\SomeRootFolder_ContainsMultipleSubFolders /s
This worked perfectly!
-
I didnt even know replace.exe exists.
-
@momurda was news to me too. Good news!