November 20, 200718 yr Newbies I am having trouble with a script. I have a layout that has a container field. I use the container field to reference to resumes located on a server. I want to be able to take a found set and export the resumes for each record. Ultimately I want to attach said resumes to a new email in OS X Mail client. I want to at least be able to export the resumes to a set folder. Which I can then automate further. At this point I can export only one record at a time.
November 20, 200718 yr One record at a time it needs to be - but you can have a script loop among the found records and do it for you. See here: http://www.fmforums.com/forum/showtopic.php?tid/179603/post/218603/#218603 Note that since you only want the found set, you should leave out the first step that shows all records.
November 20, 200718 yr Author Newbies That script appears to rename each file. Is there a way to keep the current filenames? I could reference a name on the corresponding record but some of the files differ in extension. Some are .docs, .txt, and .pdf
November 20, 200718 yr You can get the file name and extension from the container field. If your files were inserted as 'file, reference only', the calculation GetAsText ( ContainerField ) will return the file's relative and absolute paths. To extract the file name and extension and append it to the desired path, you could use something like this (untested!) Let ( [ paths = GetAsText ( YourContainerField ) ; len = Length ( paths ) ; fileName = Right ( paths ; len - Position ( paths ; "/" ; len ; - 1 ) ) ] ; "filemac:" & Get ( DesktopPath ) & "ExportedFolder/" & fileName )
November 21, 200718 yr Author Newbies Unfortunately I am unable to understand the scripts. From what I can tell I need to use both but i'm not sure how
November 21, 200718 yr I am not sure what you mean by "both". There is only "one" in my post here, and it's not a script: it's a calculation. You would use that in the SetVariable[] script step to calculate the desired value of $filePath.
Create an account or sign in to comment