dbTalk Databases Forums  

Inserting files from a folder

comp.databases.filemaker comp.databases.filemaker


Discuss Inserting files from a folder in the comp.databases.filemaker forum.



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

Default Inserting files from a folder - 11-14-2005 , 04:04 PM






Hi All,

I want to create a database of some files which are different than the
regular file. I can insert one file at a time in a container field by
right clicking on the container field and using Insert File. Now I want
to insert all my files into the database. All my files are stored in a
seperate folder. When I use the Import Record->Folder command from the
File menu, and click on the Pictures radio button and opt for inserting
just the reference, Filemaker crashes. I could not find an import
record option for file formats other than images, pictures or text
files. Can anybody help me with this? Is there a way I can import
filesinto FM7 from a folder which are other than image files , movie
files or text files?

Thanks,
Abhi


Reply With Quote
  #2  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Inserting files from a folder - 11-14-2005 , 06:52 PM






To play with files from within FileMaker I suggest you to look at the
'Troi File' plugin - www.troi.com - which is to me one of the best to do
that. It comes with excellent examples even with the trial one.
But did I understand what you're trying to achieve? I doubt it.
FileMaker is a database tool done for managing data and not files ...
Remi-Noel.

"Abhi" <abhishika (AT) gmail (DOT) com> a écrit ...
Quote:
Hi All,

I want to create a database of some files which are different than
the
regular file. I can insert one file at a time in a container field by
right clicking on the container field and using Insert File. Now I
want
to insert all my files into the database. All my files are stored in
a
seperate folder. When I use the Import Record->Folder command from the
File menu, and click on the Pictures radio button and opt for
inserting
just the reference, Filemaker crashes. I could not find an import
record option for file formats other than images, pictures or text
files. Can anybody help me with this? Is there a way I can import
filesinto FM7 from a folder which are other than image files , movie
files or text files?

Thanks,
Abhi




Reply With Quote
  #3  
Old   
Dan Fretwell
 
Posts: n/a

Default Re: Inserting files from a folder - 11-14-2005 , 07:46 PM



If you are only going to store the reference try doing it without a
container. For example in Windows the following command prompt (which
you can put into a batch file if you wish)

dir /n /b /s /a-d > dir.txt

produces a text file, dir.txt, containing a listing of all the files,
with full path, in the current directory and all its subdirectories.


Looks like this:

E:\All_Documents\Desktop.ini
E:\All_Documents\dir.txt
E:\All_Documents\Info.bat
etc....

This text file can be imported into a Filemaker database importing each
line into a text field Filename. You can open the file by using an Open
URL(table::Filename), if you haven't moved the file in the meantime.


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

Default Re: Inserting files from a folder - 11-14-2005 , 07:49 PM



Thanks for the reply. I don't want to manage files here. These files
are actually some special image files that I process and extract
information from. So each of these files should be a new record in my
database.
Since these image files are not the regular format image files, I am
not able to import the files from the folder.


Reply With Quote
  #5  
Old   
FP
 
Posts: n/a

Default Re: Inserting files from a folder - 11-14-2005 , 08:45 PM



If you use Dans approach to get the file paths into text fields in
FileMaker then you can create a script that loops through the records
and sets a container field to the file path in the text field using
"Set Field".


Reply With Quote
  #6  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Inserting files from a folder - 11-14-2005 , 09:45 PM



And if you install the TroiFile trial, after a while it will get to the
point where FileMaker will freeze when it is sent to the background, and
freeze when you try to copy/paster something .It's also $300 if you plan to
incorporate it into a database that you distribute to other people (assuming
you don't mind if their machine hangs up too).

When possible, build solutions that don't require plugins. Use Dan and FP's
suggestion; you'll be very happy with the results. The "dir /n /b /s /a-d >
dir.txt" can even be sent as an Event from within your FileMaker solution,
so no need to pay money or go outside FileMaker.

Bill

"Remi-Noel Menegaux" <rnmenegaux (AT) free (DOT) fr> wrote

Quote:
To play with files from within FileMaker I suggest you to look at the
'Troi File' plugin - www.troi.com - which is to me one of the best to do
that. It comes with excellent examples even with the trial one.
But did I understand what you're trying to achieve? I doubt it.
FileMaker is a database tool done for managing data and not files ...
Remi-Noel.

"Abhi" <abhishika (AT) gmail (DOT) com> a écrit ...
Hi All,

I want to create a database of some files which are different than the
regular file. I can insert one file at a time in a container field by
right clicking on the container field and using Insert File. Now I want
to insert all my files into the database. All my files are stored in a
seperate folder. When I use the Import Record->Folder command from the
File menu, and click on the Pictures radio button and opt for inserting
just the reference, Filemaker crashes. I could not find an import
record option for file formats other than images, pictures or text
files. Can anybody help me with this? Is there a way I can import
filesinto FM7 from a folder which are other than image files , movie
files or text files?

Thanks,
Abhi






Reply With Quote
  #7  
Old   
Abhi
 
Posts: n/a

Default Re: Inserting files from a folder - 11-14-2005 , 10:31 PM



Thanks a lot for the advice. It really helped me a lot.


Reply With Quote
  #8  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Inserting files from a folder - 11-15-2005 , 01:44 AM



I must say I didn't know anything about these features of the 'dir'
command.
This solution is spectacular. Thanks for the "dir /n /b /s /a-d >
dir.txt".

Now, back to TroiFile, I can't let say that it 'freezes' the machine
after a while. I use it extensively in FMP6 for a museum to import in
containers the references of thousands images files and it has worked
for years perfectly.
The only limit I saw in it is that when dealing with a folder full of
images files it puts all their file names in a single temporary field.
In FMP6 the field size has a limit of 64K characters thus limiting the
number of files you can handle at a time : say 6400 if each image file
name is 10 characters long including '.jpg' for example.
So in another solution in FMP6 I made - still with TroiFile - for a DVD
renting store - I had to 'import' 30 000 cover images - I had to set up
a more complex solution, splitting the original folder into something
like 40 subfolders to stay in the limit of 5000 images per folder. It
works at night and works well.
I can share this solution with anyone interested and ready to invest
some time in it.

Remi-Noel


"Dan Fretwell" <dan (AT) owlsnet (DOT) co.uk> a écrit dans le message de news:
1132019201.139858.238230 (AT) z14g20...oglegroups.com...
Quote:
If you are only going to store the reference try doing it without a
container. For example in Windows the following command prompt (which
you can put into a batch file if you wish)

dir /n /b /s /a-d > dir.txt

produces a text file, dir.txt, containing a listing of all the files,
with full path, in the current directory and all its subdirectories.


Looks like this:

E:\All_Documents\Desktop.ini
E:\All_Documents\dir.txt
E:\All_Documents\Info.bat
etc....

This text file can be imported into a Filemaker database importing
each
line into a text field Filename. You can open the file by using an
Open
URL(table::Filename), if you haven't moved the file in the meantime.




Reply With Quote
  #9  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Inserting files from a folder - 11-15-2005 , 03:08 AM



It doesn't freeze the machine (just FileMaker), and not unless certain
actions are taken... putting FileMaker to the background (but not all the
time), and copying/pasting data within FileMaker (but not all the time).
Removing the TroiFile PlugIn from the Extensions folder solved the problem
completely. There is no doubt for me it was the cause of the lockups.

This was something that had caused the unwitting end user considerable grief
and lost data.

The good news is that FileMaker 8 has introduced key features which make
this particular plugin almost moot.

Again, it's far better to build solutions that don't rely on expensive
add-on software which will increase system instability and complicate
troubleshooting. When you go against this advice, you are ensuring that you
are married to this technology "for better or for worse." Their updates (the
version of TroiFile for FileMaker 6 is not compatible with FM7 or FM8) are
not always free, so you could potentially have to pay over and over for the
plugin with successive versions of FileMaker itself.

This is in the fortunate case they decide to upgrade a plugin. While most
have been rewritten to be "7-native" there are at least three plugins (Troi
Grabber, $80-$600; Troi Number, $20-$200; Troi ClipSave, $10-$90) which have
been officially "orphaned," and others haven't been updated so far.

Perhaps the 6 version of TroiFile didn't have the bugs of the 7 version, but
I'd rather not have to pay for the maybe-forthcoming bug fix. And you
describe a fairly convoluted workaround you had to devise to overcome the
limitations of their implementation. (If you can't get TroiFile to manage a
folder with 30,000 images, then you have to either have users segment them
manually, or write another tool to handle it.)

If you ever upgrade that solution to FM8 you will undoubtedly have to
license, and pay for, another developer package of TroiFile with cash and
implementation time.... or use the techniques described here to do it
without the need for the $300 plugin.

Of course, one is welcome to learn these lessons "the hard way."

There are still some things only TroiFile can do, but I do not believe it's
appropriate anymore for TroiFile to be the easy/automatic answer it used to
be for file management tasks.

Bill

"Remi-Noel Menegaux" <rnmenegaux (AT) free (DOT) fr> wrote

Quote:
I must say I didn't know anything about these features of the 'dir'
command.
This solution is spectacular. Thanks for the "dir /n /b /s /a-d
dir.txt".

Now, back to TroiFile, I can't let say that it 'freezes' the machine after
a while. I use it extensively in FMP6 for a museum to import in containers
the references of thousands images files and it has worked for years
perfectly.
The only limit I saw in it is that when dealing with a folder full of
images files it puts all their file names in a single temporary field. In
FMP6 the field size has a limit of 64K characters thus limiting the number
of files you can handle at a time : say 6400 if each image file name is 10
characters long including '.jpg' for example.
So in another solution in FMP6 I made - still with TroiFile - for a DVD
renting store - I had to 'import' 30 000 cover images - I had to set up a
more complex solution, splitting the original folder into something like
40 subfolders to stay in the limit of 5000 images per folder. It works at
night and works well.
I can share this solution with anyone interested and ready to invest some
time in it.

Remi-Noel


"Dan Fretwell" <dan (AT) owlsnet (DOT) co.uk> a écrit dans le message de news:
1132019201.139858.238230 (AT) z14g20...oglegroups.com...
If you are only going to store the reference try doing it without a
container. For example in Windows the following command prompt (which
you can put into a batch file if you wish)

dir /n /b /s /a-d > dir.txt

produces a text file, dir.txt, containing a listing of all the files,
with full path, in the current directory and all its subdirectories.


Looks like this:

E:\All_Documents\Desktop.ini
E:\All_Documents\dir.txt
E:\All_Documents\Info.bat
etc....

This text file can be imported into a Filemaker database importing each
line into a text field Filename. You can open the file by using an Open
URL(table::Filename), if you haven't moved the file in the meantime.






Reply With Quote
  #10  
Old   
Abhi
 
Posts: n/a

Default Re: Inserting files from a folder - 11-15-2005 , 08:56 AM



Hi, I have another question. I generated the file paths in the dir.txt
and imported my filenames into a text field in the database. Is there a
way I can now insert these files into a container? I tried using Set
Field as suggested but it just displays the file name again in the
container. I also tried to use the Insert File script command but it
asks to specify an actual file path. Is there a way the Insert File
command can take the filepath from my FilePath text field?

Thanks


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.