If you have a container and right-click and choose insert file then you
get a fairly standard Windows file dialog with an extra checkbox at the
bottom "Store only a reference to the file". If you click this check box
when choosing a file then the container will show you a shortcut icon
and double-clicking on that icon will open the file. If you define
another field as a calculation GetAsText(file) then the result will be
something of the form
file:../../../Documents/Filename.doc
filewin:/E:/Documents/Filename.doc
(both lines included - the first being a relative path)
However, if you insert the file without checking the "Store only a
reference to the file" checkbox then the GetAsText(file) calculation
results in
Filename.doc
You cannot double-click this to open it and I believe that you are
exected to right-click the container and choose Export field contents in
order to put the file into a folder and then open it from there. The
reason why you are able to open files in the current folder, I suspect,
is that using the stored filename results in a search of the current
folder only to open the file. If there is no file of that name in the
folder then it doesn't work.
savvas wrote:
Quote:
What I wan't to do is pick a file from a directory (only the name of
the file with the full path)
and store it in my database (word,excel,photos, etc)
and by clicking the file to open the application.
I'm using a container field where I insert a file
I'm trying to display the full path of the container field to another
field
example: the container has a file test.xls or test.jpg
when making a button for opening the test.xls or test.jpg it opens
the files BUT ONLY if the files are at the same directory
If I type the full path and the file to a different field this work
correctly
I'm trying not to type the full path and file since it is already in
the container
I tried GetAsText(ContainerName) and it returns only the filename
with its extension, not the full path
thankX |
--
Dan
Using
FMP7.03, WinXP SP2