Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18841
    Sebastain Glowala
    Member

    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:

    1. I have a excel file that contains all data, one of it is an “custom-id”.
    2. Now I want to have the following file Name: “myfile_custom-id.pdf”, so far no problem.
    3. 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!
    Sebastian

    #18842
    Pat
    Staff

    Hey 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
    Pat

    Official MyDataMerge Team

    #18854
    Pat
    Staff

    Any progress here?

    Official MyDataMerge Team

    #18877
    Sebastain Glowala
    Member

    Hi 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.