daveblack Posted February 16, 2006 Posted February 16, 2006 Hi Squad, Gold star for anyone that solves this one. A customer of mine has been saving files into a container field instead of linking them. This has made that database huge in size considering it only has 1200 records (its about 300 meg). This is not a problem, except for the remote workers that use the DB. When they load it over a VPN connection, it takes at least 5 minutes to load. Normally this is due to large index files, but this is certainly related to the container field this time. If I remove the container field from the DB, the file size drops to 2 meg, and loads almost instantly. So my query is this, I need to create a script that takes the files out of the container field, saves it to a predefined location, and links it correctly instead. im in FM6, and would consider myself highly skilled with it, but this ones got me. Currently im looking at the task in a manual way and its not pleasant! Doing a yahoo.co.uk search on 'exporting a container field' the top result seems to give a solution, but the link is dead, which is really frustrating! CHeeeeeeeeeeeers Dave.
Genx Posted February 16, 2006 Posted February 16, 2006 ... unfortunatley container export in anything below fm8 can only be done using a static file path which means any file you exported in a script would always over write the previous one.. this problem can be worked around in 8 using a variable not that this really helps you... anyway so as far as i can tell your stuck doing manual exports... genx
Lee Smith Posted February 16, 2006 Posted February 16, 2006 Take a look [color:blue]EXPORTFM 2.0 - IMAGE MANIPULATION AND FILE MANAGEMENT PLUG-IN FOR FILEMAKER PRO the New Millennium Communications Here
Fenton Posted February 16, 2006 Posted February 16, 2006 Well, 8 might help. He could download the demo, convert the file, export the field, as separate files, then re-import the images into 6 (we must be talking about images here, as 6 doesn't do "files"). Another alternative would be duplicate the file, remove everything except the container and a linking ID field, then remove the container from the original file, and show the image via a relationship. Or would that also be slow via VPN? Even if the container is not on the layout?
Genx Posted February 17, 2006 Posted February 17, 2006 i thought the trial had some sort of limit as to the number of records that could be stored?
Genx Posted February 17, 2006 Posted February 17, 2006 ... on second thoughts... you could do it... using fun fun dos commands... basically... just do the following... 1) create an extra calc field to be the file name, we will call it [color:red]FileName... GetAsText(Container)... i hope that function exists in fm 6... anyways... 2) create 1 global field (if you know how to enter a double quotation mark normally.. cause i dont... just fix the calc lower [color:red]called gQ and in there enter a " 3) make your desired export location in windows... i have used [color:red]c:FILESTORE 4) now... hoping that we have send event in fm6 aswell... assuming we do... the script would go as follows [color:blue]Loop [color:red]Export Field Contents[Your Container Field; temp.exe] (specify the file path to be filewin:/c:/FILESTORE/temp.exe) [color:red]Pause [Duration (Seconds) ; 2] .. feel free to reduce this pause to maybe 1 second if you have a quicker computer, otherwise filemaker may not have time to place the file before windows tries to rename it... [color:red]Send Event Choose calculation and in there put the following: "cmd /c pushd " & Table::gQ & "c:FILESTORE" & Table:gQ & " & " & "rename" & " " & Table::gQ & "temp.exe" & Table::gQ & " " & Table::gQ & Table::FileName & Table::gQ The above calc when evaluated should give you: cmd /c pushd "c:FILESTORE" & rename "temp.exe" "yourfilenamehere" Also, the word Table just refers to which table your field is located in.. [color:red]Pause [Duration (Seconds) ; 2] [color:red]Exit Loop If Get(RecordNo) = Get(FoundCount) [color:red]Goto Record [Next] [color:blue]End Loop sorry if its confusing, its a long post... genx...
Genx Posted February 17, 2006 Posted February 17, 2006 (edited) ... hmmm, as for the linking... referencing perhaps an autoentered text filename field rather than the calc field i originally suggested... make sure you force the autoenter to evaluate before hand though...then just make a container field with auto enter filewin:/c:FILESTORE/filenamefield .. i say make it a container field not a calc field because i know you will likely want to enter more files manually... YAY 400 posts ??? Edited February 17, 2006 by Guest
Wim Decorte Posted February 17, 2006 Posted February 17, 2006 (specify the file path to be filewin:/c:/FILESTORE/temp.exe) None of this will work in 6 of course. The functions are just not there. Except for Send Event which was Send Message at the time. Before posting you really should try this out in 6 if you're not sure it will work, otherwise you risk wasting someone's time if they they take your info at face value and expect it to work. Out of curiosity (and so you can push your post count up) why on earth would you rename a graphic to an executable?
daveblack Posted February 17, 2006 Author Posted February 17, 2006 Thanks for all your replies, I have actually written a filemaker database that handles batch files in dos for me. I can create custom batch files and run them when needed. I use this for moving files around and handling files generated by document scanning systems that need linking to FM6. Could someone clarify that I can (using a script) export a container field's file to a set location (c:filename) in FM6, If I can do that im laughing. D
daveblack Posted February 17, 2006 Author Posted February 17, 2006 Oh, and I allready use that ExportFM plugin with quicktime to produce screen shots within filemaker, ill go back and look at what other capabilities it has. thanks Dave
Genx Posted February 17, 2006 Posted February 17, 2006 (edited) ... lol just because i didnt know he was storing images... like i said i dont know anything about filemaker prior to 7 so i was sort of just making an assumption... sorry... as for the exe... i didnt know we were storing images vs files... i figured .exe is an extension as good as any and likely better than most... but yeh... wat can i say but for silly little me... genx ??? Edited February 17, 2006 by Guest
daveblack Posted February 17, 2006 Author Posted February 17, 2006 I never said it was storing images! they are storing everything from pdf's to fax's Dave
Lee Smith Posted February 17, 2006 Posted February 17, 2006 Hi Dave, Oh, and I allready use that ExportFM plugin with quicktime to produce screen shots within filemaker, ill go back and look at what other capabilities it has. Man I hate that when I do that. Please let me know how (if) this worked for you. TIA Lee
Recommended Posts
This topic is 6856 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now