I have this file structure. I wanted to use the image filename appended with the parent folder names.
Before:
├── ak
│ ├── adak
│ │ ├── Hello\ World456
│ │ ├── cup-printing
│ │ │ └── Tshirt-printing.jpg
│ │ ├── hello-\ world789
│ │ ├── hello-world79
│ │ └── tshirt\ printing
│ │ └── Tshirt-printing.jpg
│ ├── akhiok
│ │ ├── Hello\ World456
│ │ ├── cup-printing
│ │ │ └── Tshirt-printing.jpg
│ │ ├── hello-\ world789
│ │ ├── hello-world79
│ │ └── tshirt\ printing
│ │ └── Tshirt-printing.jpg
Here parent folder names are ak, adak.
Ak= state name Adak = city name.
After it should be like this..
After:
├── ak
│ ├── adak
│ │ ├── Hello\ World456
│ │ ├── cup-printing
│ │ │ └── Tshirt-printing-adak-ak.jpg
│ │ ├── hello-\ world789
│ │ ├── hello-world79
│ │ └── tshirt\ printing
│ │ └── Tshirt-printing-adak-ak.jpg
│ ├── akhiok
│ │ ├── Hello\ World456
│ │ ├── cup-printing
│ │ │ └── Tshirt-printing-akhiok-ak.jpg
│ │ ├── hello-\ world789
│ │ ├── hello-world79
│ │ └── tshirt\ printing
│ │ └── Tshirt-printing-akhiok-ak.jpg
Bash command can help over here?
In the Automator,
I'm stuck at the finding the all the images of the file name having "tshirt" So I need to find the change the file name to their parent folder.