I have just over a thousand (1000) files whose suffix/extension has been changed by a database engine all to the same thing (eg. fileName.abcd where .abcd is on every file regardless of whether it is a jpg, pdf, or whatever else).
The goal is to convert all the files to PDF but I first just want to sort the various file types into separate folders.
I use Mac OS X and figure that there must be a Terminal script that would:
- Identify the file (Perhaps with 'File' command?) and then...
- Append the appropriate extension which would then...
- Allow me to manually sort and place them into seperate folders for further processing depending on their file type.
Using the Terminal 'File' command on a file with the database suffix, typical results are quite wordy like this, which at least shows the Mac can identify the file types even though they have the 'wrong' suffixes:
- JPEG image data, JFIF standard 1.01
- PDF document, version 1.3
- Rich Text Format data, version 1, ANSI
- etc.
So, I only need a script that would tag the files so I can use Automator to rename the files later with the appropriate suffix.
I note that if in Terminal I type 'File' and after that I drop or copy multiple files on to it, and hit return, then Terminal correctly identifies them all in the same order, but it isn't useful unless it at least tags each file type differently.
I figure this initial task is too difficult for Automator but would love to be proven wrong.
Any assistance in doing this would be appreciated. I have checked this board and elsewhere expecting someone else to have had a similar issue but found no such problem listed anywhere.