I have a folder A with many small files. In the parent folder there are many folders with other files in them. now in folder A there are files that have the same name as in the other folders, but they additionaly have .xmp at the end.
Thats the structure now:
and that is how I want it to be:
How do I find the coresponding file to foo.xmp (the coresponding file is: foo) in the parent directory and move my file there?
How do I put this in a loop so it goes through all files in my current directory?