generally, this is done with a variable calculated to be a path and filename. You can use the functions:
Get ( DesktopPath)
and for making things that will be deleted automatically when you quit Filemaker...
these functions will return the path to these places with your specific Hard disk and so on... but one thing you might also look at is the Get ( FilePath) function. Use it once from inside the file to give you the path to the file and then put that in your opener.
I seem to remember that in different areas, you'll want to have the hard disk name and in others, you need to leave it out. A little experimenting will get that done.
file:/Macintosh HD/Users/bhagara/Documents/solutions/work file downloads/Ikiru.fmp12
file://Users/bhagara/Documents/solutions/work file downloads/Ikiru.fmp12
Take a look at the Export Field Contents() Script Step and notice the Examples in the "Specify output file" dialog. The last option is a $variable, but the others show what kind of input that variable should be creating.
as an example for a remote access (this will ask for the password):
and this one has the password embedded.... (don't put this kind of thing in a public place though.)
i hope this helps...
Thank you for your input, but I believe that I have mis-stated the problem.
I know that using something like: fmp://admin:myPasswordHere@jmdserver.jmdconsulting.net/Receipts.fmp12 will open a remote database using the admin/password provided, and I have done so successfully. What I am trying to do is the same exact thing with a local file. I have tried the following:
and this does work, however, the "~" portion of the URL points only to the documents folder (/Users/jnardozza/Documents/). What I am trying to do is something like this:
but neither works
I tried your suggestion, using file:/ instead of fmp:// but I could not get the database to open (although something did happen, I managed to create a copy of the file - "Testing-1.fmp12")
lots of good information in a printable package... you may have already found this, but I keep a copy printed on the wall here.
my reading of this is that until 13.0.2, the local file wasn't an option (i didn't know that) It appears that the Documents folder is the only option at this point. If anyone has a better answer, I'm sure you'll see it here first.
of course, you could use sub-folders in the Documents folder. Is there a reason the Desktop is more desirable?
dangit.... my testing here shows that even sub-folders are not possible. weird. My guess is this is a feature that's still being developed and more will be possible in future versions. (well we hope so, anyway)
I had seen the Tony White Designs diagram, and it is actually the only reason I managed to get any of this to work at all! A very helpful link indeed. The desktop isn't more desirable per-se, however the ability to specify a sub-folder is critical for what I am trying to do. Unfortunately it does not seem possible at this time to do, as your tests (and mine) have confirmed
I wouldn't recommend passing username and password in the URL. I'm not sure that is even supported in Windows any more, and it is just not best practice.
As for what the protocol supports, tilde ("~") is a shortcut to the documents folder and dollar sign ("$") is a shortcut to a file that is currently open. Otherwise, if the file is on a server, you can use the IP address.
If you are on a Mac, and it looks like you are, you can always use applescript to open a file from whatever location you like.
Hope this helps,
ditto. be very cautious when you are able to add username and password to any URL (closed secure network, perhaps?!)
... which is why is said "don't put this in a public place"
To open a local file on windows use script step Open Url "file:/" & Get(DesktopPath) & table::filename or
"file:/" & Get(DesktopPath) & databasename.fmp12
My approach to this is to leave user/pw out of the link and let the computer "Remember me". that takes care of the link that gets you to the db and security is still handled appropriately.
Hi, this works ok to open the file but it is not possible to run a script in it.
This is an old post and I don't recall the original poster wanting to run a script.
ok, that's right. Do you know a way to call a script in a file in a local path different from document folder invoking open url instruction ?
Thanks a lot.