You should be able to set a variable to the Filepath and file name and then use that variable with Export Field Contents to export a copy of that file to the specified directory.
There's not enough detail in your post to be able to tell why this did not work for you.
Perhaps you could use Post A New Answer to post a comment that shows how you are trying to use a file path with Export Field Contents so that we can see where/why it isn't working for you?
Thanks for your reply. I tried assigning the path to a variable but got identical results.
Below is a screen shot showing all the info...
The Result is I get a file called "___Temp Store" placed in Directory: C:\Users\Mark\Documents
And that's exactly what you should get. You haven't specified a file name as the last part of the path.
You should be using something like:
"file:/C:/Users/Mark/Desktop/___ Temp Store/FILENAMEGOESHere.Extension
This assumes that you have a folder on your desktop named ____ Temp Store.
Here's how I would do it:
Set Variable [$Path ; Get ( DesktopPath ) & "___ Temp Store/" & GetContainerAttribute ( YourTable::Container ; "FileName" ) ]
Ahhhh GetContainerAttribute.....I really should have thought of that!
Thanks very much for that.
I think I may have found a bug....
So, I've tried it the way you suggested
The Variable $ExportPath holds the correct path but for some reason, instead of going to the desktop its going to the Documents folder (see below)
I created a Dialog box to see if the path was registering correctly....and it was
I checked the location of the desktop (see pic) and that's ok
And the pic on the right shows the actual location it ended up!
What do you think?
I doubt that you have a bug except in your script. This is a pretty commonly used method and we'd have a lot of reports over in Report an issue.
I suggest posting the current version of your script.
Here's the script (below)....and as I showed in the previous screenshot the variable is set correctly as is shown by the custom dialog box.
I can't see how it can be anything but a bug...
I'd like to see the entire script, not just the set variable step in it.
HI, I'm not sure what else you mean? The only other thing is the Export Field contents which you can see in the screenshot.
I'd like to see the complete script in the scripts workspace and not just the one step. If that's a script of two steps, I want to see those two steps. By uploading a new screen shot of the two steps listed together you confirm that there have been no unintentional changes to your script.
I feel like a fool.....
The Path had a space in the middle: "Temp Store". The folder did not.
What a dumbass -
Sorry for wasting your time. But thank you for the script above. I now know how to make paths dynamic.
And apologies for my last post. I wasn't seeing that complete script, just the set variable, but when I scroll back, now I see it.
You've experienced what I have posted several times in this forum: File paths must be exactly right. One little detail wrong and they don't work.