Restore files to their original locations?

Started by pmcabinet, December 27, 2023, 09:39:55 PM

Previous topic - Next topic

pmcabinet

Using iMatch Dashboard I called out the 'Writing Metadata' from Files with Problems - 76 files, 1 or 2 each from many different folders.

I copied these files to a new folder in Explorer ('iMatch metadata problems').

In order to rewrite them, I batch processed them in Affinity Photo as jpeg @ 95% and saved them to a new folder ('iMatch metadata rewrites').

iMatch picked up the two new folders and I successfully wrote back all the files in the 'iMatch metadata rewrites' folder. Now I can delete the folder 'iMatch metadata problems'.

That leaves me with all the nice, shiny rewritten files - but how do I restore these files to their original locations, without manually copying/moving them one by one? Is that possible?

ubacher

Here my untested ideas how to do this. A bit of work but probably a good learning experience.

With the original files selected run a text export with the following directions:

$ copy <iMatch metadata rewrites directory here>{file.nameExt} {file.Fullname}

Name the resulting batch file something like MoveBack.bat
(I would add a last line containing PAUSE so that you could see the results of
the batch file execution.)

This should create a windows batch file which will copy the modified files back to their original location.

You might need to add some qualifiers to the copy command to replace the originals. Not sure how a batch
program deals with a copy when a file with same name exists already.

If you run into problem/questions I am sure someone here can help you.

ALSO: If you can not easily select the files in their original direcories let us know.
I have a way to get those!

pmcabinet

Thank you ubacher, that sounds interesting.

I am not really au fait with batch files, but I will do some research and see how I get on. Indeed a learning experience; expect to hear more!