![]() In that case, you'll have to learn, how to pass variables from Automator or AppleScript to a shell script. Or you use Automator or AppleScript for the file handling. In that case, you would need to learn more about loops. Then you can call your one liner or bash script directly from Terminal. You'll have to decide, if you design your script as a pure shell script (probably a bash script) that you save as something like myScript.sh or as a one liner (each command can be separated by a colon as you see above). So that part remains up to you.ĮxifTool is much more powerful and probably you could do the whole task with it alone, but I think it's better to start with some more general scripting for the first time than diving into a much more specialised tool like ExifTool maybe in conjunction with Perl. That's something I would need to learn by myself, because I'm just a learning user like you and no programmer. Therefore you'll need to preprocess every file you want to rename in advance, detect the correct order, probably put that into an array, sort it and then take that array as input list for processing your files. The serial number you generated in step 3 won't be conform to the order of EXIF date or file creation date. Is that all? No it isn't! You now have all the basic parts of the puzzle, but one of the requirements isn't targeted at all. Mv /path/to/inputfile/filename /path/to/outputfile/$myFinalFilename Here are some ideas, that are for sure incomplete and obviously not always the perfect way of how to do shell scripting.ġ.) the command that renames or moves a file is mv, read more about it or many other commands in Terminal However to get you on track how to get a file renamed to something like IMG_000001_df2949e69be243042c9aa6e19e96d615_20171231.jpg Speaking for me, I don't have that solution ready.Īnother option is using existing software like SetEXIFData, ExifChanger, ExifRenamer, GraphicConverter or Photo Mechanic and see if it's capable to do your task. Asking for a finished solution only works if you're planning to hire someone for the job or if someone is generously enough to hand you out a solution that he already has in his box. I guess most MR members here including me are willing to help if you can present some lines of code that are not working like expected or give you general directions. There are other tutorials around that are more Mac centric, but those should get you started. One good example of someone who didn't know anything is here on. Just open Terminal and start with simple commands. It's easier than you might think to get into. ![]() Using the shell is fun if you start with simple tasks and continue to learn how to make more complex scripts. I am not expert, just having knowledge of programming basically.ĭo you want to learn shell scripting or are you asking for someone writing a script a script for you? What I cannot do is, I guess I need to use run shellscript in automator, whenever I search google, found that info. But I want to sort all of them first checking EXIF created date, and if not using created date.Ģ)Rename Finder Items: Adding Sequential, according to 1 partĤ)Add year month day using EXIF data created dateĪt the end, I want file to be seen like this This part is critical cause some files has EXIF data, some do not. I mostly use automator to do most of my job as well as renaming files.ġ)Sort files using "EXIF" data created date, if no info of EXIF, sort according to file created date (I do not want to use file created date directly, cause EXIF and this are different, first I want to check if it has EXIF data created date, if not using file created date) But all options must be used same time.
0 Comments
Leave a Reply. |