I have a fair few files that have been extracted from a zip created in a strange way.
the files have come out of the tar.gz in windows file structure format
Example:
jpg_250\MI\00\00\00\19\MI0000001900.jpg
versus
jpg_250/MI/00/00/00/19/MI0000001900.jpg
The former is seen as a single file by linux.
I've been playing around with awk and sed to delimit the filename by backslash, and create the directories in question in the correct structure, and finally rename the file to the MI**.jpg and move it into the correct newly created end directory.
Is awk and sed the way to go here? I have awk exploding the filename into the 'directories' I need but I'm having trouble getting the directories actually created. I assume I would need sed at the end to rename the file into the MI**.jpg format.
Many thanks for any help.