- AuthorPosts
- 2023-04-27 at 11:13 am #18841Sebastain GlowalaMember
Hey together,
first of all great app it helps to solve so many Problems so easy.
I have a more or less simple question but I do not know how to solve it:
- I have a excel file that contains all data, one of it is an “custom-id”.
- Now I want to have the following file Name: “myfile_custom-id.pdf”, so far no problem.
- But then I want to export every Version in a folder named by ‘custom-id’ means: /custom-id/myfile_custom-id.pdf
My Question: How can I create a Folder to every file with the “custom-id” from the excel file.
Thanks for your Help!
Sebastian2023-04-27 at 3:22 pm #18842PatStaffHey Sebastian
welcome aboard!
MyDataMerge is not capable of doing this directly. But it supports Automator actions which can do that for you. Check this video here:
https://www.youtube.com/watch?v=aItSTGK62-M
You can send your file info to an automator action which then handles sorting them into different folders. You will have to use an applescript action within Automator for this task. Here’s roughly how to do it (but Applescript support is out of our scope):
- Add an applescript action to your automator workflow
- This would be a starting point for the script
on run {input, parameters} set filePath to (the POSIX path of input) — gets the path of the generated file — Strip filename here — Create folder with filename here (if it doesnt exist) — Move file to folder end run
The applescript has to identifiy the custom-id e.g. by getting the string between .pdf and the last underscore in the filepath “path/to/file/myfile_custom-id.pdf”, then create a folder in the path (you can get that from submitted string too) with the custom-id and move the file there.
Edit:
You can use Apples inbuilt “Script editor” (press CMD+Space and enter “Script editor”) to test your script like this before using in Automator
set filePath to “existing/path/to/existing/file_custom-id.pdf” –remove this later, only for testing — Strip filename here — Create folder with filename here (if it doesnt exist) — Move file to folder
Regards
PatOfficial MyDataMerge Team
2023-05-03 at 10:47 am #18854PatStaffAny progress here?
Official MyDataMerge Team
2023-05-10 at 2:03 pm #18877Sebastain GlowalaMemberHi Pat, thanks for your answer and sorry that I did not write right back to you. I did a workaround and do the sorting after the export using AppleScript.
Thanks
Sebastian - AuthorPosts
- You must be logged in to reply to this topic.