dbTalk Databases Forums  

Changing path to Images linked in the database

comp.databases.filemaker comp.databases.filemaker


Discuss Changing path to Images linked in the database in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cassie
 
Posts: n/a

Default Changing path to Images linked in the database - 03-11-2007 , 02:25 PM






Hi All,

We have Filemaker Pro version 8.5 and are about to move our database
to a new server. Originally, the databases resided on the c:\program
files\filemaker\database directory...and images and files linked to
the database resided on the d:\vol1\ directory.

On the new server, we are moving the database to the D:\Filemaker\
directory. We would like to move the many images and files linked to
the database to the D:\Company Share Folder. Is there anyway to do
this so we do not lose the image and file paths which associate back
the database?

So confused here. Kindly help! Thanks!

~CaSsIe~


Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Changing path to Images linked in the database - 03-12-2007 , 06:44 AM






Cassie" <cassandramiller (AT) ureach (DOT) com> schreef in bericht
news:1173644758.632973.309050 (AT) v33g2000cwv (DOT) googlegroups.com...
Quote:
Hi All,

We have Filemaker Pro version 8.5 and are about to move our database
to a new server. Originally, the databases resided on the c:\program
files\filemaker\database directory...and images and files linked to
the database resided on the d:\vol1\ directory.

On the new server, we are moving the database to the D:\Filemaker\
directory. We would like to move the many images and files linked to
the database to the D:\Company Share Folder. Is there anyway to do
this so we do not lose the image and file paths which associate back
the database?

So confused here. Kindly help! Thanks!

~CaSsIe~

Cassie, When the pictures are imported they are in the fmp file. And since
the original are not needed any more you can basicaly put them any where you
want.

When you have entered the paths in a field and the calculated the image
(always the best way to go in my opinion) you just change the field for the
paths

When you have imported the pics as referenced you have to do some work. Read
the story below, I put it together when I first got fmp7, but all will still
work for 8.5.

FileMaker 7 offers the "Insert Picture/QuickTime/File" script commands to
place data into a container field. However, these script steps are limited
in that they must explicitly identify the particular file to be imported.
(You cannot express a path using a calculated value.)

If you want to dynamically control the contents of a container field, you
can instead use either the "Set Field" script step, or auto-enter options.
Both will accept a calculated value as a parameter.

The calculation must result in a string representing the file path in the
same format used by the "Insert Picture/QuickTime/File" script commands.
(Just an in any calculation, literals must be enclosed in quotes.) Supported
formats for the pathname include the following:

file:directoryName/fileName
filemac:/volumeName/directoryName/fileName
filewin:/driveletter:/directoryName/fileName
filewin://computerName/shareName/directoryName/fileName
image:directoryName/fileName
imagemac:/volumeName/directoryName/fileName
imagewin:/driveletter:/directoryName/fileName
imagewin://computerName/shareName/directoryName/fileName
movie:directoryName/fileName
moviemac:/volumeName/directoryName/fileName
moviewin:/driveletter:/directoryName/fileName
moviewin://computerName/shareName/directoryName/fileName

For example:

Set Field [Personnel::idPhoto; "imagewin:/D:/Photos/" &
Personnel::employeeID & ".jpg"]

will set idPhoto to show "23456.jpg" from the D:/Photos directory, when
employeeID is 23456.

When a container field is set using this method, the files are always stored
"by reference" only. They are not copied into the FileMaker database file.
If the original file is moved or renamed, FileMaker will display "the file
cannot be found" in the container field. If the original file is modified,
the new contents will be shown when it is updated.

Calculations may also reference container fields. for example, if you import
a picture "rose.gif" into field, "myImage" then the calculation

checkPic (calculation, text result) = TestDB::myImage

will return:

- "rose.gif" if you imported the picture from disk and stored it within
FileMaker
- "?" if you placed it into the field via the clipboard
- "size: 630,240
image:../../My Documents/My Pictures/rose.gif
imagewin:/D:/My Documents/My Pictures/rose.gif" if you imported it from
disk and stored only a reference to the file.

Using both techniques together, you could handle a situation where a
directory of images had to be moved or converted to a different format,
without re-importing them. For example:

Substitute ( Catalog::ProductImage; "/images/"; "/archived/")

If all the images referenced in your file had been moved to the "archived"
directory.

Keep well, Ursus




Reply With Quote
  #3  
Old   
Cassie
 
Posts: n/a

Default Re: Changing path to Images linked in the database - 03-13-2007 , 02:56 PM



On Mar 12, 7:44 am, "Ursus" <ursus.k... (AT) wanadoo (DOT) nl> wrote:
Quote:
Cassie" <cassandramil... (AT) ureach (DOT) com> schreef in berichtnews:1173644758.632973.309050 (AT) v33g2000cwv (DOT) googlegroups.com...





Hi All,

We haveFilemakerPro version 8.5 and are about to move our database
to a new server. Originally, the databases resided on the c:\program
files\filemaker\database directory...and images and files linked to
the database resided on the d:\vol1\ directory.

On the new server, we are moving the database to the D:\Filemaker\
directory. We would like to move the many images and files linked to
the database to the D:\Company Share Folder. Is there anyway to do
this so we do not lose theimageand file paths which associate back
the database?

So confused here. Kindly help! Thanks!

~CaSsIe~

Cassie, When the pictures are imported they are in the fmp file. And since
the original are not needed any more you can basicaly put them any where you
want.

When you have entered the paths in a field and the calculated theimage
(always the best way to go in my opinion) you just change the field for the
paths

When you have imported the pics as referenced you have to do some work. Read
the story below, I put it together when I first got fmp7, but all will still
work for 8.5.

FileMaker7 offers the "Insert Picture/QuickTime/File" script commands to
place data into a container field. However, these script steps are limited
in that they must explicitly identify the particular file to be imported.
(You cannot express a path using a calculated value.)

If you want to dynamically control the contents of a container field, you
can instead use either the "Set Field" script step, or auto-enter options.
Both will accept a calculated value as a parameter.

The calculation must result in a string representing the file path in the
same format used by the "Insert Picture/QuickTime/File" script commands.
(Just an in any calculation, literals must be enclosed in quotes.) Supported
formats for the pathname include the following:

file:directoryName/fileName
filemac:/volumeName/directoryName/fileName
filewin:/driveletter:/directoryName/fileName
filewin://computerName/shareName/directoryName/fileNameimage:directoryName/fileName
imagemac:/volumeName/directoryName/fileName
imagewin:/driveletter:/directoryName/fileName
imagewin://computerName/shareName/directoryName/fileName
movie:directoryName/fileName
moviemac:/volumeName/directoryName/fileName
moviewin:/driveletter:/directoryName/fileName
moviewin://computerName/shareName/directoryName/fileName

For example:

Set Field [Personnel::idPhoto; "imagewin:/D:/Photos/" &
Personnel::employeeID & ".jpg"]

will set idPhoto to show "23456.jpg" from the D:/Photos directory, when
employeeID is 23456.

When a container field is set using this method, the files are always stored
"by reference" only. They are not copied into theFileMakerdatabase file.
If the original file is moved or renamed,FileMakerwill display "the file
cannot be found" in the container field. If the original file is modified,
the new contents will be shown when it is updated.

Calculations may also reference container fields. for example, if you import
a picture "rose.gif" into field, "myImage" then the calculation

checkPic (calculation, text result) = TestDB::myImage

will return:

- "rose.gif" if you imported the picture from disk and stored it withinFileMaker
- "?" if you placed it into the field via the clipboard
- "size: 630,240
image:../../My Documents/My Pictures/rose.gif
imagewin:/D:/My Documents/My Pictures/rose.gif" if you imported it from
disk and stored only a reference to the file.

Using both techniques together, you could handle a situation where a
directory of images had to be moved or converted to a different format,
without re-importing them. For example:

Substitute ( Catalog::ProductImage; "/images/"; "/archived/")

If all the images referenced in your file had been moved to the "archived"
directory.

Keep well, Ursus- Hide quoted text -

- Show quoted text -
Hi Ursus,

Thank you for your reply! I think I understand what you said about
the script. But question is, where do I create the script and run
it? So confused here. Can you shed some clearer light? Is the a KB
somewhere on how to do this?

Your help is much appreciated!

**H&K**

~CaSsIe~



Reply With Quote
  #4  
Old   
Ursus
 
Posts: n/a

Default Re: Changing path to Images linked in the database - 03-13-2007 , 03:58 PM



Quote:
Thank you for your reply! I think I understand what you said about
the script. But question is, where do I create the script and run
it? So confused here. Can you shed some clearer light? Is the a KB
somewhere on how to do this?

Your help is much appreciated!

**H&K**

~CaSsIe~

Cassie,

I hope you have stored the pics as reference.

Then create a calc field

cMyImagePathName <text ; MyImage> Where MyImage is the container field where
the image is.

The calculation then reads something like imagewin:/D:/My Documents/My
Pictures/rose.gif

Create a new calculation where you replace the old path with the new path

cNewPathName <text ; replace ( cMyPathName ; ":/D:/MyDocuments/MyPictures" ;
"/C:/NewPath/" )

Now create a third calculation

cPic <Container ; cNewPathWin>

When you have moved (or rather copied to begin with) the pics from the old
to the new path they will now show in the new calculation.

When all this works, change the calculation cNewPathName to a normal
textfield. To contents will be saved, but it is now a normal text field.
When all still works you can now remove the old MyImage and the
cMyImagePathName fields.

Remember with all these complex stuff to try it on a copy first!

Keep well, Ursus




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.