Newbies ehardesty Posted November 20, 2007 Newbies Posted November 20, 2007 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.
comment Posted November 20, 2007 Posted November 20, 2007 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.
Newbies ehardesty Posted November 20, 2007 Author Newbies Posted November 20, 2007 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
comment Posted November 20, 2007 Posted November 20, 2007 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 )
Newbies ehardesty Posted November 21, 2007 Author Newbies Posted November 21, 2007 Unfortunately I am unable to understand the scripts. From what I can tell I need to use both but i'm not sure how
comment Posted November 21, 2007 Posted November 21, 2007 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.
Recommended Posts
This topic is 6213 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now